]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: livepatch: Fix it to do root uid check and skip
authorShuah Khan <skhan@linuxfoundation.org>
Mon, 16 Dec 2019 19:18:40 +0000 (12:18 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 23 Dec 2019 17:52:40 +0000 (10:52 -0700)
commit13a0bd486a708ccb97f79401a40df6c181d145df
treec63d40118701bf2d7b124b12697e9395c6104ee9
parent237bdb8eac65a8d85cd659aad01eae50261b454d
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>
tools/testing/selftests/livepatch/functions.sh
tools/testing/selftests/livepatch/test-state.sh