From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: [nft PATCH 2/7] tests: shell: packetpath/flowtables: Avoid spurious EPERM
Date: Sat, 9 Mar 2024 12:35:22 +0100 [thread overview]
Message-ID: <20240309113527.8723-3-phil@nwl.cc> (raw)
In-Reply-To: <20240309113527.8723-1-phil@nwl.cc>
On my system for testing, called socat is not allowed to create the pipe
file in local directory (probably due to sshfs). Specify a likely unique
path in /tmp to avoid such problems.
Fixes: 419c0199774c6 ("tests: shell: add test to cover ct offload by using nft flowtables")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
tests/shell/testcases/packetpath/flowtables | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/shell/testcases/packetpath/flowtables b/tests/shell/testcases/packetpath/flowtables
index 852a05c6d0ab1..18a57a9b2b726 100755
--- a/tests/shell/testcases/packetpath/flowtables
+++ b/tests/shell/testcases/packetpath/flowtables
@@ -79,17 +79,17 @@ ip netns exec $R sysctl -w net.netfilter.nf_conntrack_tcp_timeout_established=86
# A trick to control the timing to send a packet
ip netns exec $S socat TCP6-LISTEN:10001 GOPEN:pipefile,ignoreeof &
sleep 1
-ip netns exec $C socat -b 2048 PIPE:pipefile TCP:[2001:db8:ffff:22::1]:10001 &
+ip netns exec $C socat -b 2048 PIPE:/tmp/pipefile-$rnd 'TCP:[2001:db8:ffff:22::1]:10001' &
sleep 1
ip netns exec $R grep 'OFFLOAD' /proc/net/nf_conntrack || { echo "check [OFFLOAD] tag (failed)"; exit 1; }
ip netns exec $R cat /proc/net/nf_conntrack
sleep 6
ip netns exec $R grep 'OFFLOAD' /proc/net/nf_conntrack && { echo "CT OFFLOAD timeout, fail back to classical path (failed)"; exit 1; }
ip netns exec $R grep '8639[0-9]' /proc/net/nf_conntrack || { echo "check nf_conntrack_tcp_timeout_established (failed)"; exit 1; }
-ip netns exec $C echo "send sth" >> pipefile
+ip netns exec $C echo "send sth" >> /tmp/pipefile-$rnd
ip netns exec $R grep 'OFFLOAD' /proc/net/nf_conntrack || { echo "traffic seen, back to OFFLOAD path (failed)"; exit 1; }
ip netns exec $C sleep 3
-ip netns exec $C echo "send sth" >> pipefile
+ip netns exec $C echo "send sth" >> /tmp/pipefile-$rnd
ip netns exec $C sleep 3
ip netns exec $R grep 'OFFLOAD' /proc/net/nf_conntrack || { echo "Traffic seen in 5s (nf_flowtable_tcp_timeout), so stay in OFFLOAD (failed)"; exit 1; }
--
2.43.0
next prev parent reply other threads:[~2024-03-09 11:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 11:35 [nft PATCH 0/7] A bunch of JSON printer/parser fixes Phil Sutter
2024-03-09 11:35 ` [nft PATCH 1/7] tests: shell: maps/named_ct_objects: Fix for recent kernel Phil Sutter
2024-03-09 11:39 ` Florian Westphal
2024-03-09 11:44 ` Phil Sutter
2024-03-09 11:35 ` Phil Sutter [this message]
2024-03-09 11:35 ` [nft PATCH 3/7] json: Order output like nft_cmd_expand() Phil Sutter
2024-03-09 11:35 ` [nft PATCH 4/7] tests: shell: Regenerate all json-nft dumps Phil Sutter
2024-03-09 11:35 ` [nft PATCH 5/7] json: Support maps with concatenated data Phil Sutter
2024-03-09 11:35 ` [nft PATCH 6/7] parser: json: Support for synproxy objects Phil Sutter
2024-03-09 11:35 ` [nft PATCH 7/7] tests: shell: Add missing json-nft dumps Phil Sutter
2024-03-19 17:26 ` [nft PATCH 0/7] A bunch of JSON printer/parser fixes Phil Sutter
2024-04-24 20:06 ` Pablo Neira Ayuso
2024-04-24 20:08 ` Pablo Neira Ayuso
2024-04-24 20:41 ` Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240309113527.8723-3-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).