selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh
Subsystems (2)
PATCH 1/2 selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh
From: George Guo <[email protected]>
Updated test-syscall.sh to replace the path /sys/kernel/test_klp_syscall/npids with a variable $MOD_SYSCALL.
--- tools/testing/selftests/livepatch/test-syscall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/livepatch/test-syscall.sh +2 -2
@@ -24,9 +24,9 @@ pid_list=$(echo ${pids[@]} | tr ' ' ',') load_lp $MOD_SYSCALL klp_pids=$pid_list # wait for all tasks to transition to patched state -loop_until 'grep -q '^0$' /sys/kernel/test_klp_syscall/npids' +loop_until 'grep -q '^0$' /sys/kernel/$MOD_SYSCALL/npids' -pending_pids=$(cat /sys/kernel/test_klp_syscall/npids) +pending_pids=$(cat /sys/kernel/$MOD_SYSCALL/npids) log "$MOD_SYSCALL: Remaining not livepatched processes: $pending_pids" for pid in ${pids[@]}; do
Signature · 1 line
2.43.0
PATCH 2/2 selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
From: George Guo <[email protected]>
Replaced the hardcoded module name test_klp_callbacks_demo in the pre_patch_callback log message with the variable $MOD_LIVEPATCH.
--- tools/testing/selftests/livepatch/test-callbacks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/livepatch/test-callbacks.sh +1 -1
@@ -259,7 +259,7 @@ $MOD_TARGET: ${MOD_TARGET}_init % insmod test_modules/$MOD_LIVEPATCH.ko pre_patch_ret=-19 livepatch: enabling patch '$MOD_LIVEPATCH' livepatch: '$MOD_LIVEPATCH': initializing patching transition -test_klp_callbacks_demo: pre_patch_callback: vmlinux +$MOD_LIVEPATCH: pre_patch_callback: vmlinux livepatch: pre-patch callback failed for object 'vmlinux' livepatch: failed to enable patch '$MOD_LIVEPATCH' livepatch: '$MOD_LIVEPATCH': canceling patching transition, going to unpatch
Signature · 1 line
2.43.0
Re: [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
Quoted 6 lines · George Guo
From: George Guo <[email protected]>
Replaced the hardcoded module name
test_klp_callbacks_demoin thepre_patch_callbacklog message with the variable $MOD_LIVEPATCH.Signed-off-by George Guo <[email protected]>
Best Regards,
Petr
Re: [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
Quoted 6 lines · On Tue, 26 Nov 2024 14:18:30 +0100 Petr Mladek <[email protected]> wrote:
Quoted 5 lines · George Guo
From: George Guo <[email protected]>
Replaced the hardcoded module name
test_klp_callbacks_demoin thepre_patch_callbacklog message with the variable $MOD_LIVEPATCH.
Quoted 6 lines
Quoted 1 line
Signed-off-by George Guo <[email protected]>Reviewed-by Petr Mladek <[email protected]>Best Regards,
Petr
Hi petr,
This patch could be merged?
Thanks!
Petr Mladek
maintainerRe: [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
In reply to George GuoQuoted 6 lines · George Guo
From: George Guo <[email protected]>
Replaced the hardcoded module name
test_klp_callbacks_demoin thepre_patch_callbacklog message with the variable $MOD_LIVEPATCH.Signed-off-by George Guo <[email protected]>
JFYI, this patch has been committed into livepatching.git, branch for-6.14/selftests-trivial.
Best Regards,
Petr
Petr Mladek
maintainerQuoted 6 lines · George Guo
From: George Guo <[email protected]>
Updated
test-syscall.shto replace the path/sys/kernel/test_klp_syscall/npidswith a variable $MOD_SYSCALL.Signed-off-by George Guo <[email protected]>
This has already been fixed by the commit 59766286b6e54f8ad33 ("selftests: livepatch: save and restore kprobe state"). The change reached the mainline last week during the merge window for 6.13.
Best Regards,
Petr