linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Po-Hsu Lin <po-hsu.lin@canonical.com>
Cc: <linux-kselftest@vger.kernel.org>, <netdev@vger.kernel.org>,
	<bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<shuah@kernel.org>, <skhan@linuxfoundation.org>, <ast@kernel.org>,
	<daniel@iogearbox.net>, <andrii@kernel.org>, <kafai@fb.com>,
	<songliubraving@fb.com>, <yhs@fb.com>, <john.fastabend@gmail.com>,
	<kpsingh@kernel.org>, <davem@davemloft.net>, <kuba@kernel.org>,
	<hawk@kernel.org>, <nikolay@nvidia.com>, <gnault@redhat.com>,
	<vladimir.oltean@nxp.com>, <idosch@nvidia.com>,
	<baowen.zheng@corigine.com>, <danieller@nvidia.com>,
	<petrm@nvidia.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCHv2] selftests: Use kselftest skip code for skipped tests
Date: Wed, 26 May 2021 10:53:52 +0200	[thread overview]
Message-ID: <87y2c1swnz.fsf@nvidia.com> (raw)
In-Reply-To: <20210525113316.25416-1-po-hsu.lin@canonical.com>


Po-Hsu Lin <po-hsu.lin@canonical.com> writes:

> There are several test cases still using exit 0 when they need to be
> skipped. Use kselftest framework skip code instead so it can help us
> to distinguish the proper return status.
>
> Criterion to filter out what should be fixed in selftests directory:
>   grep -r "exit 0" -B1 | grep -i skip
>
> This change might cause some false-positives if people are running
> these test scripts directly and only checking their return codes,
> which will change from 0 to 4. However I think the impact should be
> small as most of our scripts here are already using this skip code.
> And there will be no such issue if running them with the kselftest
> framework.
>
> V2: router_mpath_nh.sh and outer_mpath_nh_res.sh sources lib.sh,
> there is no need to assign ksft_skip value in these two.
>
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>

I want to note that defining ksft_skip=4 in every test separately is the
current practice. I agree with Willem (in a parallel thread) that this
stuff should live in a library of its own, but there is none currently.
When there is, it looks like the conversion would be mechanical.

Which is to say, IMHO this patch makes sense on its own as an
incremental improvement.

Reviewed-by: Petr Machata <petrm@nvidia.com>

  reply	other threads:[~2021-05-26  8:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 11:33 [PATCHv2] selftests: Use kselftest skip code for skipped tests Po-Hsu Lin
2021-05-26  8:53 ` Petr Machata [this message]
2021-07-08  4:18   ` Po-Hsu Lin
2021-07-09 17:53     ` Shuah Khan

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=87y2c1swnz.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=baowen.zheng@corigine.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=gnault@redhat.com \
    --cc=hawk@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=po-hsu.lin@canonical.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=songliubraving@fb.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=yhs@fb.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 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).