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>
This commit is contained in:
Boris Sukholitko 2023-05-04 11:48:11 +03:00 committed by Pablo Neira Ayuso
parent e72eeab542
commit 0a11073e8e

View File

@ -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