Re: [PATCH net] selftests: net: wait for receiver startup in so_txtime.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2024-02-08 at 16:45 +0100, Paolo Abeni wrote:
> The mentioned test is failing in slow environments:
> 
>   # SO_TXTIME ipv4 clock monotonic
>   # ./so_txtime: recv: timeout: Resource temporarily unavailable
>   not ok 1 selftests: net: so_txtime.sh # exit=1
> 
> The receiver is started in background and the sender could end-up
> transmitting the packet before the receiver is ready, so that the
> later recv times out.
> 
> Address the issue explcitly waiting for the socket being bound to
> the relevant port.
> 
> Fixes: af5136f95045 ("selftests/net: SO_TXTIME with ETF and FQ")
> Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
> ---
> Note that to really cope with slow env the mentioned self-tests also
> need net-next commit c41dfb0dfbec ("selftests/net: ignore timing
> errors in so_txtime if KSFT_MACHINE_SLOW"), so this could be applied to
> net-next, too

Oops... CI is saying the above is not enough...

> @@ -65,6 +70,7 @@ do_test() {
>  
>  	local readonly START="$(date +%s%N --date="+ 0.1 seconds")"
>  	ip netns exec "${NS2}" "${BIN}" -"${IP}" -c "${CLOCK}" -t "${START}" -S "${SADDR}" -D "${DADDR}" "${RXARGS}" -r &
> +	wait_local_port_listen "${NS2}" 8000 "${PROTO}"
>  	ip netns exec "${NS1}" "${BIN}" -"${IP}" -c "${CLOCK}" -t "${START}" -S "${SADDR}" -D "${DADDR}" "${TXARGS}"

The binary explicitly waits up to $START time, and that conflicts with
the wait_local_port_listen, something different is needed. Apparently I
was just "lucky" during my local testing.

Cheers,

Paolo






[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux