Skip to content

Commit fc78630

Browse files
Phil Sutterummakynes
authored andcommitted
selftests: netfilter: Avoid hanging ipvs.sh
If the client can't reach the server, the latter remains listening forever. Kill it after 5s of waiting. Fixes: 867d219 ("selftests: netfilter: add ipvs test script") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent e306e37 commit fc78630

File tree

1 file changed

+1
-1
lines changed
  • tools/testing/selftests/net/netfilter

1 file changed

+1
-1
lines changed

tools/testing/selftests/net/netfilter/ipvs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ cleanup() {
9797
}
9898

9999
server_listen() {
100-
ip netns exec "$ns2" socat -u -4 TCP-LISTEN:8080,reuseaddr STDOUT > "${outfile}" &
100+
ip netns exec "$ns2" timeout 5 socat -u -4 TCP-LISTEN:8080,reuseaddr STDOUT > "${outfile}" &
101101
server_pid=$!
102102
sleep 0.2
103103
}

0 commit comments

Comments
 (0)