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)
commit05564c29fc943c467abb1f60ef1f0a68c4c424e9
treec63d40118701bf2d7b124b12697e9395c6104ee9
parentc65e41538b04e0d64a673828745a00cb68a24371
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