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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87zfiagojj.fsf@nvidia.com>
Date: Tue, 25 Feb 2025 14:01:10 +0100
From: Petr Machata <petrm@...dia.com>
To: Pablo Martin Medrano <pablmart@...hat.com>
CC: <netdev@...r.kernel.org>, "David S . Miller" <davem@...emloft.net>, "Eric
 Dumazet" <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Shuah Khan
	<shuah@...nel.org>
Subject: Re: [PATCH net v2] selftests/net: big_tcp: return xfail on slow
 machines


Pablo Martin Medrano <pablmart@...hat.com> writes:

> diff --git a/tools/testing/selftests/net/big_tcp.sh b/tools/testing/selftests/net/big_tcp.sh
> index 2db9d15cd45f..dc2ecfd58961 100755
> --- a/tools/testing/selftests/net/big_tcp.sh
> +++ b/tools/testing/selftests/net/big_tcp.sh
> @@ -21,8 +21,7 @@ CLIENT_GW6="2001:db8:1::2"
>  MAX_SIZE=128000
>  CHK_SIZE=65535
>  
> -# Kselftest framework requirement - SKIP code is 4.
> -ksft_skip=4
> +source lib.sh
>  
>  setup() {
>  	ip netns add $CLIENT_NS
> @@ -143,21 +142,20 @@ do_test() {

Just a small comment.

In general it is a good hygiene to have a RET=0 for each log_test(). A
test that neglects to set it will get a spurious failure if it comes
after a failing test. Arguably log_test() should do this automatically,
but currently it does not.

Due to all the &&'s peppered down there, do_test() only gets called at
most once, so it's OK in this case.

>  	start_counter link3 $SERVER_NS
>  	do_netperf $CLIENT_NS
>  
> -	if check_counter link1 $ROUTER_NS; then
> -		check_counter link3 $SERVER_NS || ret="FAIL_on_link3"
> -	else
> -		ret="FAIL_on_link1"
> -	fi
> +	check_counter link1 $ROUTER_NS
> +	check_err $? "fail on link1"
> +	check_counter link3 $SERVER_NS
> +	check_err $? "fail on link3"
>  
>  	stop_counter link1 $ROUTER_NS
>  	stop_counter link3 $SERVER_NS
> -	printf "%-9s %-8s %-8s %-8s: [%s]\n" \
> -		$cli_tso $gw_gro $gw_tso $ser_gro $ret
> +	log_test "$(printf "%-9s %-8s %-8s %-8s" \
> +			$cli_tso $gw_gro $gw_tso $ser_gro)"
>  	test $ret = "PASS"
>  }
>  
>  testup() {
> -	echo "CLI GSO | GW GRO | GW GSO | SER GRO" && \
> +	echo "      CLI GSO | GW GRO | GW GSO | SER GRO" && \
>  	do_test "on"  "on"  "on"  "on"  && \
>  	do_test "on"  "off" "on"  "off" && \
>  	do_test "off" "on"  "on"  "on"  && \
> @@ -176,7 +174,8 @@ if ! ip link help 2>&1 | grep gso_ipv4_max_size &> /dev/null; then
>  fi
>  
>  trap cleanup EXIT
> +xfail_on_slow
>  setup && echo "Testing for BIG TCP:" && \
>  NF=4 testup && echo "***v4 Tests Done***" && \
>  NF=6 testup && echo "***v6 Tests Done***"
> -exit $?
> +exit $EXIT_STATUS


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ