From a2818ee4dce575b299d8a7f46b393bc2b02ef1f4 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Wed, 9 Jan 2019 13:43:29 +0100 Subject: selftests/livepatch: introduce tests Add a few livepatch modules and simple target modules that the included regression suite can run tests against: - basic livepatching (multiple patches, atomic replace) - pre/post (un)patch callbacks - shadow variable API Signed-off-by: Joe Lawrence Signed-off-by: Petr Mladek Tested-by: Miroslav Benes Tested-by: Alice Ferrazzi Acked-by: Joe Lawrence Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina --- lib/Kconfig.debug | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'lib/Kconfig.debug') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index d4df5b24d75e..0298eb8eaa4e 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1991,6 +1991,27 @@ config TEST_MEMCAT_P If unsure, say N. +config TEST_LIVEPATCH + tristate "Test livepatching" + default n + depends on LIVEPATCH + depends on m + help + Test kernel livepatching features for correctness. The tests will + load test modules that will be livepatched in various scenarios. + + To run all the livepatching tests: + + make -C tools/testing/selftests TARGETS=livepatch run_tests + + Alternatively, individual tests may be invoked: + + tools/testing/selftests/livepatch/test-callbacks.sh + tools/testing/selftests/livepatch/test-livepatch.sh + tools/testing/selftests/livepatch/test-shadow-vars.sh + + If unsure, say N. + config TEST_OBJAGG tristate "Perform selftest on object aggreration manager" default n @@ -1999,7 +2020,6 @@ config TEST_OBJAGG Enable this option to test object aggregation manager on boot (or module load). - If unsure, say N. endif # RUNTIME_TESTING_MENU -- cgit From bae054372aba0100e7b320f768c4875b5f0c23b3 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Thu, 31 Jan 2019 11:41:24 -0500 Subject: selftests/livepatch: add DYNAMIC_DEBUG config dependency The livepatch selftest scripts turn on dynamic_debug of livepatch kernel source to determine expected behavior. TEST_LIVEPATCH should therefore include DYNAMIC_DEBUG in its list of dependencies. Signed-off-by: Joe Lawrence Acked-by: Miroslav Benes Signed-off-by: Petr Mladek --- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Kconfig.debug') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 0298eb8eaa4e..0a3af2965ba0 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1994,6 +1994,7 @@ config TEST_MEMCAT_P config TEST_LIVEPATCH tristate "Test livepatching" default n + depends on DYNAMIC_DEBUG depends on LIVEPATCH depends on m help -- cgit