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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d5016925e415c422c37f7ac1c5374a06bbdc2126.camel@redhat.com>
Date: Thu, 09 May 2024 11:36:27 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Taehee Yoo <ap420073@...il.com>, davem@...emloft.net,
 edumazet@...gle.com,  kuba@...nel.org, shuah@...nel.org,
 netdev@...r.kernel.org,  linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net] selftests: net: avoid waiting for server in amt.sh
 forever when it fails.

On Wed, 2024-05-08 at 04:06 +0000, Taehee Yoo wrote:

> @@ -210,40 +217,52 @@ check_features()
>  
>  test_ipv4_forward()
>  {
> -	RESULT4=$(ip netns exec "${LISTENER}" nc -w 1 -l -u 239.0.0.1 4000)
> +	echo "" > $RESULT
> +	bash -c "$(ip netns exec "${LISTENER}" \
> +		timeout 10s  > $RESULT)"
> +	RESULT4=$(< $RESULT)

if you instead do:

	RESULT4=$(timeout 10s ip netns exec \
		  "${LISTENER}" nc -w 1 -l -u 239.0.0.1 4000)

You can avoid the additional tmp file (RESULT)

>  	if [ "$RESULT4" == "172.17.0.2" ]; then
>  		printf "TEST: %-60s  [ OK ]\n" "IPv4 amt multicast forwarding"
> -		exit 0
>  	else
>  		printf "TEST: %-60s  [FAIL]\n" "IPv4 amt multicast forwarding"
> -		exit 1
>  	fi
> +
>  }

[...]

> @@ -259,19 +278,17 @@ setup_iptables
>  setup_mcast_routing
>  test_remote_ip
>  test_ipv4_forward &
> -pid=$!
> -send_mcast4
> -wait $pid || err=$?
> -if [ $err -eq 1 ]; then
> -	ERR=1
> -fi
> +spid=$!
> +send_mcast4 &
> +cpid=$!
> +wait $spid

It looks like you don't capture anymore the return code from
test_ipv4_forward, why?

That will foul the test runner infra to think that this test is always
successful.

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ