Skip to content

Commit

Permalink
selftests: netfilter: nft_flowtable.sh: bump socat timeout to 1m
Browse files Browse the repository at this point in the history
Now that this test runs in netdev CI it looks like 10s isn't enough
for debug kernels:
  selftests: net/netfilter: nft_flowtable.sh
  2024/05/10 20:33:08 socat[12204] E write(7, 0x563feb16a000, 8192): Broken pipe
  FAIL: file mismatch for ns1 -> ns2
  -rw------- 1 root root 37345280 May 10 20:32 /tmp/tmp.Am0yEHhNqI
 ...

Looks like socat gets zapped too quickly, so increase timeout to 1m.

Could also reduce tx file size for KSFT_MACHINE_SLOW, but its preferrable
to have same test for both debug and nondebug.

Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20240511064814.561525-1-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Florian Westphal authored and Jakub Kicinski committed May 13, 2024
1 parent cfc2eef commit 5fcc17d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/testing/selftests/net/netfilter/nft_flowtable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
source lib.sh

ret=0
SOCAT_TIMEOUT=60

nsin=""
ns1out=""
Expand Down Expand Up @@ -350,12 +351,12 @@ test_tcp_forwarding_ip()
local dstport=$4
local lret=0

timeout 10 ip netns exec "$nsb" socat -4 TCP-LISTEN:12345,reuseaddr STDIO < "$nsin" > "$ns2out" &
timeout "$SOCAT_TIMEOUT" ip netns exec "$nsb" socat -4 TCP-LISTEN:12345,reuseaddr STDIO < "$nsin" > "$ns2out" &
lpid=$!

busywait 1000 listener_ready

timeout 10 ip netns exec "$nsa" socat -4 TCP:"$dstip":"$dstport" STDIO < "$nsin" > "$ns1out"
timeout "$SOCAT_TIMEOUT" ip netns exec "$nsa" socat -4 TCP:"$dstip":"$dstport" STDIO < "$nsin" > "$ns1out"

wait $lpid

Expand Down

0 comments on commit 5fcc17d

Please sign in to comment.