From: Hangbin Liu <liuhangbin@gmail.com>
To: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org,
Brendan Jackman <jackmanb@google.com>,
netdev@vger.kernel.org
Subject: Re: [PATCHv3] selftests: Use ktap helpers for runner.sh
Date: Thu, 5 Mar 2026 01:56:02 +0000 [thread overview]
Message-ID: <aajisr9n2pInS7jm@fedora> (raw)
In-Reply-To: <DGO2DAIFY07Y.367VMZA7XGT4U@google.com>
Hi Shuah,
Is there anything else I need to do to move this patch forward?
Thanks
Hangbin
On Wed, Feb 25, 2026 at 01:06:47PM +0000, Brendan Jackman wrote:
> On Wed Feb 25, 2026 at 1:08 AM UTC, Hangbin Liu wrote:
> > Instead of manually writing ktap messages, we should use the formal
> > ktap helpers in runner.sh. Brendan did some work in d9e6269e3303
> > ("selftests/run_kselftest.sh: exit with error if tests fail") to make
> > run_kselftest.sh exit with the correct return value. However, the output
> > does not include the total results, such as how many tests passed or failed.
> >
> > Let’s convert all manually printed messages in runner.sh to use the
> > formal ktap helpers. Here are what I changed:
> >
> > 1. Move TAP header from runner.sh to run_kselftest.sh, since run_kselftest.sh
> > is the only caller of run_many().
> > 2. In run_kselftest.sh, call run_many() in main process to count the
> > pass/fail numbers.
> > 3. In run_kselftest.sh, do not generate kselftest_failures_file. Just
> > use ktap_print_totals to report the result.
> > 4. In runner.sh run_one(), get the return value and use ktap helpers for
> > all pass/fail reporting. This allows counting pass/fail numbers in the
> > main process.
> > 5. In runner.sh run_in_netns(), also return the correct rc, so we can
> > count results during wait.
> >
> > After the change, the printed result looks like:
> >
> > not ok 4 4 selftests: clone3: clone3_cap_checkpoint_restore # exit=1
> > # Totals: pass:3 fail:1 xfail:0 xpass:0 skip:0 error:0
> >
> > ]# echo $?
> > 1
> >
> > Tested-by: Brendan Jackman <jackmanb@google.com>
>
> Thanks,
>
> Reviewed-by: Brendan Jackman <jackmanb@google.com>
next prev parent reply other threads:[~2026-03-05 1:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 1:08 [PATCHv3] selftests: Use ktap helpers for runner.sh Hangbin Liu
2026-02-25 13:06 ` Brendan Jackman
2026-03-05 1:56 ` Hangbin Liu [this message]
2026-03-11 2:17 ` Hangbin Liu
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=aajisr9n2pInS7jm@fedora \
--to=liuhangbin@gmail.com \
--cc=jackmanb@google.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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