All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Joe Lawrence <joe.lawrence@redhat.com>
Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-s390@vger.kernel.org, Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH] selftests/livepatch: fix and refactor new dmesg message code
Date: Wed, 20 Dec 2023 21:19:50 +0100	[thread overview]
Message-ID: <ZYNMZnRAgAXcvbqq@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com> (raw)
In-Reply-To: <20231220151151.267985-1-joe.lawrence@redhat.com>

On Wed, Dec 20, 2023 at 10:11:51AM -0500, Joe Lawrence wrote:
> The livepatching kselftests rely on comparing expected vs. observed
> dmesg output.  After each test, new dmesg entries are determined by the
> 'comm' utility comparing a saved, pre-test copy of dmesg to post-test
> dmesg output.
> 
> Alexander reports that the 'comm --nocheck-order -13' invocation used by
> the tests can be confused when dmesg entry timestamps vary in magnitude
> (ie, "[   98.820331]" vs. "[  100.031067]"), in which case, additional
> messages are reported as new.  The unexpected entries then spoil the
> test results.
> 
> Instead of relying on 'comm' or 'diff' to determine new testing dmesg
> entries, refactor the code:
> 
>   - pre-test  : log a unique canary dmesg entry
>   - test      : run tests, log messages
>   - post-test : filter dmesg starting from pre-test message
> 
> Reported-by: Alexander Gordeev <agordeev@linux.ibm.com>
> Closes: https://lore.kernel.org/live-patching/ZYAimyPYhxVA9wKg@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com/
> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
> ---
>  .../testing/selftests/livepatch/functions.sh  | 37 +++++++++----------
>  1 file changed, 17 insertions(+), 20 deletions(-)

Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>

  reply	other threads:[~2023-12-20 20:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20 15:11 [PATCH] selftests/livepatch: fix and refactor new dmesg message code Joe Lawrence
2023-12-20 20:19 ` Alexander Gordeev [this message]
2023-12-22 12:27 ` Marcos Paulo de Souza
2024-01-12 15:40 ` 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=ZYNMZnRAgAXcvbqq@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com \
    --to=agordeev@linux.ibm.com \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=pmladek@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.