lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 25 May 2021 18:43:39 +0800 From: Po-Hsu Lin <po-hsu.lin@...onical.com> To: Petr Machata <petrm@...dia.com> Cc: linux-kselftest@...r.kernel.org, netdev@...r.kernel.org, bpf@...r.kernel.org, linux-kernel@...r.kernel.org, shuah <shuah@...nel.org>, Shuah Khan <skhan@...uxfoundation.org>, ast@...nel.org, daniel@...earbox.net, andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com, john.fastabend@...il.com, kpsingh@...nel.org, David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, hawk@...nel.org, nikolay@...dia.com, gnault@...hat.com, vladimir.oltean@....com, idosch@...dia.com, baowen.zheng@...igine.com, danieller@...dia.com Subject: Re: [PATCH] selftests: Use kselftest skip code for skipped tests On Tue, May 25, 2021 at 6:20 PM Petr Machata <petrm@...dia.com> wrote: > > > Po-Hsu Lin <po-hsu.lin@...onical.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.
Powered by blists - more mailing lists