selftests: nft_flowtable.sh: wait for specific nc pids
authorBoris Sukholitko <boris.sukholitko@broadcom.com>
Thu, 4 May 2023 08:48:13 +0000 (11:48 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 10 May 2023 07:31:06 +0000 (09:31 +0200)
Doing wait with no parameters may interfere with some of the tests
having their own background processes.

Although no such test is currently present, the cleanup is useful
to rely on the nft_flowtable.sh for local development (e.g. running
background tcpdump command during the tests).

Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/netfilter/nft_flowtable.sh

index 3cf20e9bd3a6019cc14cc6ee58646335337eb913..92bc308bf1686a5f4d6b7d971c8cb26197066b4d 100755 (executable)
@@ -296,7 +296,8 @@ test_tcp_forwarding_ip()
                kill $cpid
        fi
 
-       wait
+       wait $lpid
+       wait $cpid
 
        if ! check_transfer "$nsin" "$ns2out" "ns1 -> ns2"; then
                lret=1