summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorBoris Sukholitko <boris.sukholitko@broadcom.com>2023-05-04 11:48:11 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2023-05-10 09:30:52 +0200
commit0a11073e8e3362d715255d28d294aa7350c1c01f (patch)
treedc46fc3dbf8e0d580b7e8a2845b2cbd666236bfa /tools/testing
parente72eeab542dbf4f544e389e64fa13b82a1b6d003 (diff)
selftests: nft_flowtable.sh: use /proc for pid checking
Some ps commands (e.g. busybox derived) have no -p option. Use /proc for pid existence check. Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/netfilter/nft_flowtable.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/netfilter/nft_flowtable.sh b/tools/testing/selftests/netfilter/nft_flowtable.sh
index 7060bae04ec8..4d8bc51b7a7b 100755
--- a/tools/testing/selftests/netfilter/nft_flowtable.sh
+++ b/tools/testing/selftests/netfilter/nft_flowtable.sh
@@ -288,11 +288,11 @@ test_tcp_forwarding_ip()
sleep 3
- if ps -p $lpid > /dev/null;then
+ if test -d /proc/"$lpid"/; then
kill $lpid
fi
- if ps -p $cpid > /dev/null;then
+ if test -d /proc/"$cpid"/; then
kill $cpid
fi