diff options
author | Fabian Frederick <fabf@skynet.be> | 2020-08-07 21:32:20 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-08-13 04:25:16 +0200 |
commit | d8bb9abe21071c64d077f9db3b403823a389464f (patch) | |
tree | ab25b6c616b8377f60337fc9898bcdadad8e1e01 /tools/testing | |
parent | dd08734d8aca31f8991b26cd69d6bb99b617e451 (diff) |
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')
-rwxr-xr-x | tools/testing/selftests/netfilter/nft_flowtable.sh | 10 |
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" |