aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/livepatch (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-15selftests/livepatch: Add functions.sh to TEST_PROGS_EXTENDEDMiroslav Benes1-0/+1
Add functions.sh to TEST_PROGS_EXTENDED so that it is installed along with the rest of the selftests and they can be run. Originally-by: Shuah Khan <shuah@kernel.org> Signed-off-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
2019-03-27selftests/livepatch: use TEST_PROGS for test scriptsJoe Lawrence1-1/+1
Adrian reports that 'make -C tools clean' results in removal of the livepatch selftest shell scripts. As per the selftest lib.mk file, TEST_PROGS are for test shell scripts, not TEST_GEN_PROGS. Adjust the livepatch selftest Makefile accordingly. Reported-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> Tested-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
2019-02-12livepatch/selftests: use "$@" to preserve argument listJoe Lawrence1-12/+7
The livepatch selftest functions.sh library uses "$*" and an intermediate variable to extract and then pass arguments from function to function call. The effect of this combination is that the argument list is flattened into a single argument. Sometimes this is benign, but in cases like __load_mod(), the modprobe invocation will interpret all the module parameters as a single parameter. Drop the intermediate variable and use the "$@" special parameter as described in the bash manual. Link: https://www.gnu.org/software/bash/manual/bash.html#Special-Parameters Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Acked-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Petr Mladek <pmladek@suse.com>
2019-01-11selftests/livepatch: introduce testsJoe Lawrence7-0/+1070
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 <joe.lawrence@redhat.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Tested-by: Miroslav Benes <mbenes@suse.cz> Tested-by: Alice Ferrazzi <alice.ferrazzi@gmail.com> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>