aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/netfilter/nft_flowtable.sh
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2020-08-07 21:32:20 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2020-08-13 04:25:16 +0200
commitd8bb9abe21071c64d077f9db3b403823a389464f (patch)
treeab25b6c616b8377f60337fc9898bcdadad8e1e01 /tools/testing/selftests/netfilter/nft_flowtable.sh
parentselftests: netfilter: add MTU arguments to flowtables (diff)
downloadwireguard-linux-d8bb9abe21071c64d077f9db3b403823a389464f.tar.xz
wireguard-linux-d8bb9abe21071c64d077f9db3b403823a389464f.zip
selftests: netfilter: kill running process only
Avoid noise like the following: nft_flowtable.sh: line 250: kill: (4691) - No such process Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/testing/selftests/netfilter/nft_flowtable.sh')
-rwxr-xr-xtools/testing/selftests/netfilter/nft_flowtable.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/testing/selftests/netfilter/nft_flowtable.sh b/tools/testing/selftests/netfilter/nft_flowtable.sh
index e98cac6f8bfd..a47d1d832210 100755
--- a/tools/testing/selftests/netfilter/nft_flowtable.sh
+++ b/tools/testing/selftests/netfilter/nft_flowtable.sh
@@ -250,8 +250,14 @@ test_tcp_forwarding_ip()
sleep 3
- kill $lpid
- kill $cpid
+ if ps -p $lpid > /dev/null;then
+ kill $lpid
+ fi
+
+ if ps -p $cpid > /dev/null;then
+ kill $cpid
+ fi
+
wait
check_transfer "$ns1in" "$ns2out" "ns1 -> ns2"