From: Po-Hsu Lin <po-hsu.lin@canonical.com>
To: Petr Machata <petrm@nvidia.com>
Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
shuah <shuah@kernel.org>, Shuah Khan <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,
David Miller <davem@davemloft.net>,
Jakub Kicinski <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
Subject: Re: [PATCH] selftests: Use kselftest skip code for skipped tests
Date: Tue, 25 May 2021 18:43:39 +0800 [thread overview]
Message-ID: <CAMy_GT9iCU+BJLp_mVALkyBwnzV8fCJQawRJqk_pFvKV=7TU1A@mail.gmail.com> (raw)
In-Reply-To: <87lf83cdyj.fsf@nvidia.com>
On Tue, May 25, 2021 at 6:20 PM Petr Machata <petrm@nvidia.com> wrote:
>
>
> Po-Hsu Lin <po-hsu.lin@canonical.com> writes:
>
> > diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
> > index 42e28c9..eed9f08 100644
> > --- a/tools/testing/selftests/net/forwarding/lib.sh
> > +++ b/tools/testing/selftests/net/forwarding/lib.sh
> > @@ -4,6 +4,9 @@
> > ##############################################################################
> > # Defines
> >
> > +# Kselftest framework requirement - SKIP code is 4.
> > +ksft_skip=4
> > +
> > # Can be overridden by the configuration file.
> > PING=${PING:=ping}
> > PING6=${PING6:=ping6}
> > @@ -121,7 +124,7 @@ check_ethtool_lanes_support()
> >
> > if [[ "$(id -u)" -ne 0 ]]; then
> > echo "SKIP: need root privileges"
> > - exit 0
> > + exit $ksft_skip
> > fi
> >
> > if [[ "$CHECK_TC" = "yes" ]]; then
> > diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh
> > index 76efb1f..bb7dc6d 100755
> > --- a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh
> > +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh
> > @@ -1,6 +1,9 @@
> > #!/bin/bash
> > # SPDX-License-Identifier: GPL-2.0
> >
> > +# Kselftest framework requirement - SKIP code is 4.
> > +ksft_skip=4
> > +
> > ALL_TESTS="
> > ping_ipv4
> > ping_ipv6
> > @@ -411,7 +414,7 @@ ping_ipv6()
> > ip nexthop ls >/dev/null 2>&1
> > if [ $? -ne 0 ]; then
> > echo "Nexthop objects not supported; skipping tests"
> > - exit 0
> > + exit $ksft_skip
> > fi
> >
> > trap cleanup EXIT
>
> router_mpath_nh.sh sources lib.sh, which you changed above. This hunk
> should not be necessary.
Hello Petr,
Nice catch, I will remove the following lines in those script that
sources lib.sh:
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
Will prepare V2 later, thanks!
>
> > diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh
> > index 4898dd4..e7bb976 100755
> > --- a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh
> > +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh
> > @@ -1,6 +1,9 @@
> > #!/bin/bash
> > # SPDX-License-Identifier: GPL-2.0
> >
> > +# Kselftest framework requirement - SKIP code is 4.
> > +ksft_skip=4
> > +
> > ALL_TESTS="
> > ping_ipv4
> > ping_ipv6
> > @@ -386,7 +389,7 @@ ping_ipv6()
> > ip nexthop ls >/dev/null 2>&1
> > if [ $? -ne 0 ]; then
> > echo "Nexthop objects not supported; skipping tests"
> > - exit 0
> > + exit $ksft_skip
> > fi
> >
> > trap cleanup EXIT
>
> Likewise.
>
> Unless I'm missing some indirect dependency, no other selftests in your
> patch have this problem.
next prev parent reply other threads:[~2021-05-25 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 6:17 [PATCH] selftests: Use kselftest skip code for skipped tests Po-Hsu Lin
2021-05-25 10:20 ` Petr Machata
2021-05-25 10:43 ` Po-Hsu Lin [this message]
2021-05-25 13:56 ` Willem de Bruijn
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='CAMy_GT9iCU+BJLp_mVALkyBwnzV8fCJQawRJqk_pFvKV=7TU1A@mail.gmail.com' \
--to=po-hsu.lin@canonical.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=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=songliubraving@fb.com \
--cc=vladimir.oltean@nxp.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).