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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 May 2021 12:20:04 +0200
From:   Petr Machata <petrm@...dia.com>
To:     Po-Hsu Lin <po-hsu.lin@...onical.com>
CC:     <linux-kselftest@...r.kernel.org>, <netdev@...r.kernel.org>,
        <bpf@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <shuah@...nel.org>, <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>, <davem@...emloft.net>, <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>,
        <petrm@...dia.com>
Subject: Re: [PATCH] selftests: Use kselftest skip code for skipped tests


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.

> 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ