netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3 linux-next] selftests: netfilter: kill running process only
@ 2020-08-07 19:32 Fabian Frederick
  2020-08-13  2:24 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2020-08-07 19:32 UTC (permalink / raw)
  To: pablo, kadlec, fw; +Cc: netfilter-devel, coreteam, netdev, Fabian Frederick

Avoid noise like the following:
nft_flowtable.sh: line 250: kill: (4691) - No such process

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 tools/testing/selftests/netfilter/nft_flowtable.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/netfilter/nft_flowtable.sh b/tools/testing/selftests/netfilter/nft_flowtable.sh
index e98cac6f8bfdd..a47d1d8322104 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"
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/3 linux-next] selftests: netfilter: kill running process only
  2020-08-07 19:32 [PATCH 3/3 linux-next] selftests: netfilter: kill running process only Fabian Frederick
@ 2020-08-13  2:24 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2020-08-13  2:24 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: kadlec, fw, netfilter-devel, coreteam, netdev

On Fri, Aug 07, 2020 at 09:32:20PM +0200, Fabian Frederick wrote:
> Avoid noise like the following:
> nft_flowtable.sh: line 250: kill: (4691) - No such process

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-13  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-07 19:32 [PATCH 3/3 linux-next] selftests: netfilter: kill running process only Fabian Frederick
2020-08-13  2:24 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).