Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: George Guo <dongtai.guo@linux.dev>
Cc: jpoimboe@kernel.org, jikos@kernel.org, pmladek@suse.com,
	 joe.lawrence@redhat.com, shuah@kernel.org,
	live-patching@vger.kernel.org,  linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org,  George Guo <guodongtai@kylinos.cn>
Subject: Re: [PATCH livepatch/master v1 1/6] selftests/livepatch: fix test-callbacks.sh execution error
Date: Thu, 21 Nov 2024 14:16:43 +0100 (CET)	[thread overview]
Message-ID: <alpine.LSU.2.21.2411211414400.8938@pobox.suse.cz> (raw)
In-Reply-To: <20241121111135.2125391-1-dongtai.guo@linux.dev>

Hi,

On Thu, 21 Nov 2024, George Guo wrote:

> From: George Guo <guodongtai@kylinos.cn>
> 
> The script test-callbacks.sh fails with the following error:
> $ sudo ./test-callbacks.sh
> TEST: target module before livepatch ... not ok
> 
> - expected
> + result
>  test_klp_callbacks_mod: test_klp_callbacks_mod_init
>  % insmod test_modules/test_klp_callbacks_demo.ko
>  livepatch: enabling patch 'test_klp_callbacks_demo'
> -livepatch: 'test_klp_callbacks_demo': initializing patching transition
> +transition: 'test_klp_callbacks_demo': initializing patching transition
>  test_klp_callbacks_demo: pre_patch_callback: vmlinux
>  test_klp_callbacks_demo: pre_patch_callback: test_klp_callbacks_mod -> [MODULE_STATE_LIVE] Normal state
> -livepatch: 'test_klp_callbacks_demo': starting patching transition
> -livepatch: 'test_klp_callbacks_demo': completing patching transition
> +transition: 'test_klp_callbacks_demo': starting patching transition
> +transition: 'test_klp_callbacks_demo': completing patching transition
>  test_klp_callbacks_demo: post_patch_callback: vmlinux
>  test_klp_callbacks_demo: post_patch_callback: test_klp_callbacks_mod -> [MODULE_STATE_LIVE] Normal state
> -livepatch: 'test_klp_callbacks_demo': patching complete
> +transition: 'test_klp_callbacks_demo': patching complete
>  % echo 0 > /sys/kernel/livepatch/test_klp_callbacks_demo/enabled
> -livepatch: 'test_klp_callbacks_demo': initializing unpatching transition
> +transition: 'test_klp_callbacks_demo': initializing unpatching transition
>  test_klp_callbacks_demo: pre_unpatch_callback: vmlinux
>  test_klp_callbacks_demo: pre_unpatch_callback: test_klp_callbacks_mod -> [MODULE_STATE_LIVE] Normal state
> -livepatch: 'test_klp_callbacks_demo': starting unpatching transition
> -livepatch: 'test_klp_callbacks_demo': completing unpatching transition
> +transition: 'test_klp_callbacks_demo': starting unpatching transition
> +transition: 'test_klp_callbacks_demo': completing unpatching transition
>  test_klp_callbacks_demo: post_unpatch_callback: vmlinux
>  test_klp_callbacks_demo: post_unpatch_callback: test_klp_callbacks_mod -> [MODULE_STATE_LIVE] Normal state
> -livepatch: 'test_klp_callbacks_demo': unpatching complete
> +transition: 'test_klp_callbacks_demo': unpatching complete
>  % rmmod test_klp_callbacks_demo
>  % rmmod test_klp_callbacks_mod
>  test_klp_callbacks_mod: test_klp_callbacks_mod_exit
> 
> 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.

are you sure? I have just run livepatch selftests on v6.12 and everything 
was fine.

The above suggests that something happened to KBUILD_MODNAME in your case 
(which would also mean that the fix should be different). Could you 
verify or provide more information, please?

Miroslav

      parent reply	other threads:[~2024-11-21 13:16 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 ` [PATCH livepatch/master v1 5/6] selftests/livepatch: fix test-syscall.sh " George Guo
2024-11-21 11:11 ` [PATCH livepatch/master v1 6/6] selftests/livepatch: fix test-sysfs.sh " George Guo
2024-11-21 13:16 ` Miroslav Benes [this message]

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=alpine.LSU.2.21.2411211414400.8938@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=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=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