]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/lkdtm: Don't clear dmesg when running tests
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 8 May 2020 06:53:55 +0000 (16:53 +1000)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 8 May 2020 15:45:50 +0000 (09:45 -0600)
commit7ae48e01456fa84e7df1c49865fda8bd0dfeee9b
tree81af23ff6a76922921dfab631fb9573b16107386
parent0110c7bc21dd41d6e342b793208e4663424d8a1e
selftests/lkdtm: Don't clear dmesg when running tests

It is Very Rude to clear dmesg in test scripts. That's because the
script may be part of a larger test run, and clearing dmesg
potentially destroys the output of other tests.

We can avoid using dmesg -c by saving the content of dmesg before the
test, and then using diff to compare that to the dmesg afterward,
producing a log with just the added lines.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/lkdtm/run.sh