From: George Guo <dongtai.guo@linux.dev>
To: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz,
pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org
Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, George Guo <guodongtai@kylinos.cn>
Subject: [PATCH livepatch/master v1 5/6] selftests/livepatch: fix test-syscall.sh execution error
Date: Thu, 21 Nov 2024 19:11:34 +0800 [thread overview]
Message-ID: <20241121111135.2125391-5-dongtai.guo@linux.dev> (raw)
In-Reply-To: <20241121111135.2125391-1-dongtai.guo@linux.dev>
From: George Guo <guodongtai@kylinos.cn>
The script test-syscall.sh fails with the following error:
$ sudo ./test-syscall.sh
TEST: patch getpid syscall while being heavily hammered ... not ok
- expected
+ result
% insmod test_modules/test_klp_syscall.ko klp_pids=18484,18485,18486,18487,18488,18489,18490,...
livepatch: enabling patch 'test_klp_syscall'
-livepatch: 'test_klp_syscall': initializing patching transition
-livepatch: 'test_klp_syscall': starting patching transition
-livepatch: 'test_klp_syscall': completing patching transition
-livepatch: 'test_klp_syscall': patching complete
+transition: 'test_klp_syscall': initializing patching transition
+transition: 'test_klp_syscall': starting patching transition
+transition: 'test_klp_syscall': completing patching transition
+transition: 'test_klp_syscall': patching complete
test_klp_syscall: Remaining not livepatched processes: 0
% echo 0 > /sys/kernel/livepatch/test_klp_syscall/enabled
-livepatch: 'test_klp_syscall': initializing unpatching transition
-livepatch: 'test_klp_syscall': starting unpatching transition
-livepatch: 'test_klp_syscall': completing unpatching transition
-livepatch: 'test_klp_syscall': unpatching complete
+transition: 'test_klp_syscall': initializing unpatching transition
+transition: 'test_klp_syscall': starting unpatching transition
+transition: 'test_klp_syscall': completing unpatching transition
+transition: 'test_klp_syscall': unpatching complete
% rmmod test_klp_syscall
ERROR: livepatch kselftest(s) failed
The issue arises due to a mismatch in expected log output during livepatch
transition. Specifically, the logs previously contained "livepatch:" but have
now been updated to "transition:". This results in test failures when comparing
the output with the expected values.
This patch updates the expected test output to reflect the new log format.
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
.../testing/selftests/livepatch/test-syscall.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/livepatch/test-syscall.sh b/tools/testing/selftests/livepatch/test-syscall.sh
index 289eb7d4c4b3..6493e1115add 100755
--- a/tools/testing/selftests/livepatch/test-syscall.sh
+++ b/tools/testing/selftests/livepatch/test-syscall.sh
@@ -41,16 +41,16 @@ unload_lp $MOD_SYSCALL
check_result "% insmod test_modules/$MOD_SYSCALL.ko klp_pids=$pid_list
livepatch: enabling patch '$MOD_SYSCALL'
-livepatch: '$MOD_SYSCALL': initializing patching transition
-livepatch: '$MOD_SYSCALL': starting patching transition
-livepatch: '$MOD_SYSCALL': completing patching transition
-livepatch: '$MOD_SYSCALL': patching complete
+transition: '$MOD_SYSCALL': initializing patching transition
+transition: '$MOD_SYSCALL': starting patching transition
+transition: '$MOD_SYSCALL': completing patching transition
+transition: '$MOD_SYSCALL': patching complete
$MOD_SYSCALL: Remaining not livepatched processes: 0
% echo 0 > /sys/kernel/livepatch/$MOD_SYSCALL/enabled
-livepatch: '$MOD_SYSCALL': initializing unpatching transition
-livepatch: '$MOD_SYSCALL': starting unpatching transition
-livepatch: '$MOD_SYSCALL': completing unpatching transition
-livepatch: '$MOD_SYSCALL': unpatching complete
+transition: '$MOD_SYSCALL': initializing unpatching transition
+transition: '$MOD_SYSCALL': starting unpatching transition
+transition: '$MOD_SYSCALL': completing unpatching transition
+transition: '$MOD_SYSCALL': unpatching complete
% rmmod $MOD_SYSCALL"
exit 0
--
2.39.2
next prev parent reply other threads:[~2024-11-21 11:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 11:11 [PATCH livepatch/master v1 1/6] selftests/livepatch: fix test-callbacks.sh execution error George Guo
2024-11-21 11:11 ` [PATCH livepatch/master v1 2/6] selftests/livepatch: fix test-ftrace.sh " George Guo
2024-11-21 11:11 ` [PATCH livepatch/master v1 3/6] selftests/livepatch: fix test-livepatch.sh " George Guo
2024-11-21 11:11 ` [PATCH livepatch/master v1 4/6] selftests/livepatch: fix test-state.sh " George Guo
2024-11-21 11:11 ` George Guo [this message]
2024-11-21 11:11 ` [PATCH livepatch/master v1 6/6] selftests/livepatch: fix test-sysfs.sh " George Guo
2024-11-21 13:16 ` [PATCH livepatch/master v1 1/6] selftests/livepatch: fix test-callbacks.sh " Miroslav Benes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241121111135.2125391-5-dongtai.guo@linux.dev \
--to=dongtai.guo@linux.dev \
--cc=guodongtai@kylinos.cn \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox