aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/livepatch/test-state.sh
diff options
context:
space:
mode:
authorShuah Khan <skhan@linuxfoundation.org>2019-12-16 12:18:40 -0700
committerShuah Khan <skhan@linuxfoundation.org>2019-12-23 10:52:40 -0700
commit05564c29fc943c467abb1f60ef1f0a68c4c424e9 (patch)
treec63d40118701bf2d7b124b12697e9395c6104ee9 /tools/testing/selftests/livepatch/test-state.sh
parentselftests: firmware: Fix it to do root uid check and skip (diff)
downloadlinux-dev-05564c29fc943c467abb1f60ef1f0a68c4c424e9.tar.xz
linux-dev-05564c29fc943c467abb1f60ef1f0a68c4c424e9.zip
selftests: livepatch: Fix it to do root uid check and skip
livepatch test configures the system and debug environment to run tests. Some of these actions fail without root access and test dumps several permission denied messages before it exits. Fix test-state.sh to call setup_config instead of set_dynamic_debug as suggested by Petr Mladek <pmladek@suse.com> Fix it to check root uid and exit with skip code instead. Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/livepatch/test-state.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/livepatch/test-state.sh b/tools/testing/selftests/livepatch/test-state.sh
index dc2908c22c26..a08212708115 100755
--- a/tools/testing/selftests/livepatch/test-state.sh
+++ b/tools/testing/selftests/livepatch/test-state.sh
@@ -8,8 +8,7 @@ MOD_LIVEPATCH=test_klp_state
MOD_LIVEPATCH2=test_klp_state2
MOD_LIVEPATCH3=test_klp_state3
-set_dynamic_debug
-
+setup_config
# TEST: Loading and removing a module that modifies the system state