mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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 <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>
This commit is contained in:
parent
d67a537209
commit
a2818ee4dc
20 changed files with 1740 additions and 485 deletions
24
lib/livepatch/test_klp_callbacks_mod.c
Normal file
24
lib/livepatch/test_klp_callbacks_mod.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (C) 2018 Joe Lawrence <joe.lawrence@redhat.com>
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
static int test_klp_callbacks_mod_init(void)
|
||||
{
|
||||
pr_info("%s\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void test_klp_callbacks_mod_exit(void)
|
||||
{
|
||||
pr_info("%s\n", __func__);
|
||||
}
|
||||
|
||||
module_init(test_klp_callbacks_mod_init);
|
||||
module_exit(test_klp_callbacks_mod_exit);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Joe Lawrence <joe.lawrence@redhat.com>");
|
||||
MODULE_DESCRIPTION("Livepatch test: target module");
|
Loading…
Add table
Add a link
Reference in a new issue