diff options
author | Boris Sukholitko <boris.sukholitko@broadcom.com> | 2023-05-04 11:48:11 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-05-10 09:30:52 +0200 |
commit | 0a11073e8e3362d715255d28d294aa7350c1c01f (patch) | |
tree | dc46fc3dbf8e0d580b7e8a2845b2cbd666236bfa /tools | |
parent | e72eeab542dbf4f544e389e64fa13b82a1b6d003 (diff) | |
download | lwn-0a11073e8e3362d715255d28d294aa7350c1c01f.tar.gz lwn-0a11073e8e3362d715255d28d294aa7350c1c01f.zip |
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')
-rwxr-xr-x | tools/testing/selftests/netfilter/nft_flowtable.sh | 4 |
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 |