From 2eeb0d457d13ed7b170e13cd99d15509d0dd832d Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Thu, 18 Jun 2020 14:10:38 -0400 Subject: selftests/livepatch: Don't clear dmesg when running tests Inspired by commit f131d9edc29d ("selftests/lkdtm: Don't clear dmesg when running tests"), keep a reference dmesg copy when beginning each test. This way check_result() can compare against the initial copy rather than relying upon an empty log. Signed-off-by: Joe Lawrence Reviewed-by: Kamalesh Babulal Reviewed-by: Yannick Cote Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618181040.21132-2-joe.lawrence@redhat.com --- tools/testing/selftests/livepatch/test-shadow-vars.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tools/testing/selftests/livepatch/test-shadow-vars.sh') diff --git a/tools/testing/selftests/livepatch/test-shadow-vars.sh b/tools/testing/selftests/livepatch/test-shadow-vars.sh index 7c016548c2ea..e04cb354f56b 100755 --- a/tools/testing/selftests/livepatch/test-shadow-vars.sh +++ b/tools/testing/selftests/livepatch/test-shadow-vars.sh @@ -9,11 +9,9 @@ MOD_TEST=test_klp_shadow_vars setup_config -# TEST: basic shadow variable API # - load a module that exercises the shadow variable API -echo -n "TEST: basic shadow variable API ... " -dmesg -C +start_test "basic shadow variable API" load_mod $MOD_TEST unload_mod $MOD_TEST -- cgit v1.2.3