live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Joe Lawrence <joe.lawrence@redhat.com>
Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 1/3] selftests/livepatch: Don't clear dmesg when running tests
Date: Thu, 11 Jun 2020 09:38:04 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.21.2006110930590.32091@pobox.suse.cz> (raw)
In-Reply-To: <20200610172101.21910-2-joe.lawrence@redhat.com>

Hi,

On Wed, 10 Jun 2020, Joe Lawrence wrote:

> diff --git a/tools/testing/selftests/livepatch/test-callbacks.sh b/tools/testing/selftests/livepatch/test-callbacks.sh
> index 32b57ba07f4f..c3d949da5bb7 100755
> --- a/tools/testing/selftests/livepatch/test-callbacks.sh
> +++ b/tools/testing/selftests/livepatch/test-callbacks.sh
> @@ -12,7 +12,7 @@ MOD_TARGET_BUSY=test_klp_callbacks_busy
>  setup_config
>  
>  
> -# TEST: target module before livepatch
> +start_test "target module before livepatch"
>  #
>  # Test a combination of loading a kernel module and a livepatch that
>  # patches a function in the first module.  Load the target module
> @@ -28,9 +28,6 @@ setup_config
>  #   unpatching transition starts.  klp_objects are reverted, post-patch
>  #   callbacks execute and the transition completes.
>  
> -echo -n "TEST: target module before livepatch ... "
> -dmesg -C
> -

A nit, but I think it would be better to place start_test here below the 
comment. The same for other occurrences in test-callbacks.sh.

[...]

> diff --git a/tools/testing/selftests/livepatch/test-state.sh b/tools/testing/selftests/livepatch/test-state.sh
> index a08212708115..bf8db1613961 100755
> --- a/tools/testing/selftests/livepatch/test-state.sh
> +++ b/tools/testing/selftests/livepatch/test-state.sh
> @@ -10,10 +10,7 @@ MOD_LIVEPATCH3=test_klp_state3
>  
>  setup_config
>  
> -# TEST: Loading and removing a module that modifies the system state
> -
> -echo -n "TEST: system state modification ... "
> -dmesg -C
> +start_test "Loading and removing a module that modifies the system state"

start_test should get the message from the original echo command and not 
the comment above, I think...

>  load_lp $MOD_LIVEPATCH
>  disable_lp $MOD_LIVEPATCH
> @@ -41,10 +38,7 @@ livepatch: '$MOD_LIVEPATCH': unpatching complete
>  % rmmod $MOD_LIVEPATCH"
>  
>  
> -# TEST: Take over system state change by a cumulative patch
> -
> -echo -n "TEST: taking over system state modification ... "
> -dmesg -C
> +start_test "Take over system state change by a cumulative patch"
>  
>  load_lp $MOD_LIVEPATCH
>  load_lp $MOD_LIVEPATCH2
> @@ -85,10 +79,7 @@ livepatch: '$MOD_LIVEPATCH2': unpatching complete
>  % rmmod $MOD_LIVEPATCH2"
>  
>  
> -# TEST: Take over system state change by a cumulative patch
> -
> -echo -n "TEST: compatible cumulative livepatches ... "
> -dmesg -C
> +start_test "Take over system state change by a cumulative patch"

...because now we have two "Take over system state change by a cumulative 
patch" tests in the log.

Miroslav

  reply	other threads:[~2020-06-11  7:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 17:20 [PATCH 0/3] selftests/livepatch: small script cleanups Joe Lawrence
2020-06-10 17:20 ` [PATCH 1/3] selftests/livepatch: Don't clear dmesg when running tests Joe Lawrence
2020-06-11  7:38   ` Miroslav Benes [this message]
2020-06-11 13:01     ` Joe Lawrence
2020-06-11 13:06       ` Miroslav Benes
2020-06-12  9:49   ` Petr Mladek
2020-06-14 15:19     ` Joe Lawrence
2020-06-12 10:11   ` Petr Mladek
2020-06-10 17:21 ` [PATCH 2/3] selftests/livepatch: use $(dmesg --notime) instead of manually filtering Joe Lawrence
2020-06-12 10:12   ` Petr Mladek
2020-06-10 17:21 ` [PATCH 3/3] selftests/livepatch: filter 'taints' from dmesg comparison Joe Lawrence
2020-06-11  7:39   ` Miroslav Benes
2020-06-11 13:10     ` Joe Lawrence
2020-06-12 11:47       ` Petr Mladek
2020-06-12 12:57         ` Kamalesh Babulal
2020-06-14 14:45           ` Joe Lawrence
2020-06-15  7:55             ` Miroslav Benes
2020-06-15  9:19               ` Petr Mladek

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.2006110930590.32091@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=live-patching@vger.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;
as well as URLs for NNTP newsgroup(s).