live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh
@ 2024-11-25 11:28 George Guo
  2024-11-25 11:28 ` [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh George Guo
  2024-11-26 13:08 ` [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh Petr Mladek
  0 siblings, 2 replies; 6+ messages in thread
From: George Guo @ 2024-11-25 11:28 UTC (permalink / raw)
  To: jpoimboe, jikos, mbenes, pmladek, joe.lawrence, shuah
  Cc: live-patching, linux-kselftest, linux-kernel, George Guo

From: George Guo <guodongtai@kylinos.cn>

Updated test-syscall.sh to replace the path 
/sys/kernel/test_klp_syscall/npids with a variable $MOD_SYSCALL.

Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
 tools/testing/selftests/livepatch/test-syscall.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/livepatch/test-syscall.sh b/tools/testing/selftests/livepatch/test-syscall.sh
index b76a881d4..9cfa17b6b 100755
--- a/tools/testing/selftests/livepatch/test-syscall.sh
+++ b/tools/testing/selftests/livepatch/test-syscall.sh
@@ -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
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
  2024-11-25 11:28 [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh George Guo
@ 2024-11-25 11:28 ` George Guo
  2024-11-26 13:18   ` Petr Mladek
  2024-12-09 10:33   ` Petr Mladek
  2024-11-26 13:08 ` [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh Petr Mladek
  1 sibling, 2 replies; 6+ messages in thread
From: George Guo @ 2024-11-25 11:28 UTC (permalink / raw)
  To: jpoimboe, jikos, mbenes, pmladek, joe.lawrence, shuah
  Cc: live-patching, linux-kselftest, linux-kernel, George Guo

From: George Guo <guodongtai@kylinos.cn>

Replaced the hardcoded module name test_klp_callbacks_demo in the
pre_patch_callback log message with the variable $MOD_LIVEPATCH.

Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
 tools/testing/selftests/livepatch/test-callbacks.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/livepatch/test-callbacks.sh b/tools/testing/selftests/livepatch/test-callbacks.sh
index 32b150e25..150cb68fe 100755
--- a/tools/testing/selftests/livepatch/test-callbacks.sh
+++ b/tools/testing/selftests/livepatch/test-callbacks.sh
@@ -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
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh
  2024-11-25 11:28 [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh George Guo
  2024-11-25 11:28 ` [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh George Guo
@ 2024-11-26 13:08 ` Petr Mladek
  1 sibling, 0 replies; 6+ messages in thread
From: Petr Mladek @ 2024-11-26 13:08 UTC (permalink / raw)
  To: George Guo
  Cc: jpoimboe, jikos, mbenes, joe.lawrence, shuah, live-patching,
	linux-kselftest, linux-kernel, George Guo

On Mon 2024-11-25 19:28:11, George Guo wrote:
> From: George Guo <guodongtai@kylinos.cn>
> 
> Updated test-syscall.sh to replace the path 
> /sys/kernel/test_klp_syscall/npids with a variable $MOD_SYSCALL.
> 
> Signed-off-by: George Guo <guodongtai@kylinos.cn>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
  2024-11-25 11:28 ` [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh George Guo
@ 2024-11-26 13:18   ` Petr Mladek
  2024-12-09  2:36     ` George Guo
  2024-12-09 10:33   ` Petr Mladek
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Mladek @ 2024-11-26 13:18 UTC (permalink / raw)
  To: George Guo
  Cc: jpoimboe, jikos, mbenes, joe.lawrence, shuah, live-patching,
	linux-kselftest, linux-kernel, George Guo

On Mon 2024-11-25 19:28:12, George Guo wrote:
> From: George Guo <guodongtai@kylinos.cn>
> 
> Replaced the hardcoded module name test_klp_callbacks_demo in the
> pre_patch_callback log message with the variable $MOD_LIVEPATCH.
> 
> Signed-off-by: George Guo <guodongtai@kylinos.cn>

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
  2024-11-26 13:18   ` Petr Mladek
@ 2024-12-09  2:36     ` George Guo
  0 siblings, 0 replies; 6+ messages in thread
From: George Guo @ 2024-12-09  2:36 UTC (permalink / raw)
  To: Petr Mladek
  Cc: jpoimboe, jikos, mbenes, joe.lawrence, shuah, live-patching,
	linux-kselftest, George Guo

On Tue, 26 Nov 2024 14:18:30 +0100
Petr Mladek <pmladek@suse.com> wrote:

> On Mon 2024-11-25 19:28:12, George Guo wrote:
> > From: George Guo <guodongtai@kylinos.cn>
> > 
> > Replaced the hardcoded module name test_klp_callbacks_demo in the
> > pre_patch_callback log message with the variable $MOD_LIVEPATCH.
> > 
> > Signed-off-by: George Guo <guodongtai@kylinos.cn>  
> 
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> 
> Best Regards,
> Petr

Hi petr,

This patch could be merged?

Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh
  2024-11-25 11:28 ` [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh George Guo
  2024-11-26 13:18   ` Petr Mladek
@ 2024-12-09 10:33   ` Petr Mladek
  1 sibling, 0 replies; 6+ messages in thread
From: Petr Mladek @ 2024-12-09 10:33 UTC (permalink / raw)
  To: George Guo
  Cc: jpoimboe, jikos, mbenes, joe.lawrence, shuah, live-patching,
	linux-kselftest, linux-kernel, George Guo

On Mon 2024-11-25 19:28:12, George Guo wrote:
> From: George Guo <guodongtai@kylinos.cn>
> 
> Replaced the hardcoded module name test_klp_callbacks_demo in the
> pre_patch_callback log message with the variable $MOD_LIVEPATCH.
> 
> Signed-off-by: George Guo <guodongtai@kylinos.cn>

JFYI, this patch has been committed into livepatching.git,
branch for-6.14/selftests-trivial.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-09 10:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-25 11:28 [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh George Guo
2024-11-25 11:28 ` [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh George Guo
2024-11-26 13:18   ` Petr Mladek
2024-12-09  2:36     ` George Guo
2024-12-09 10:33   ` Petr Mladek
2024-11-26 13:08 ` [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).