From: Thomas Haller <thaller@redhat.com>
To: NetFilter <netfilter-devel@vger.kernel.org>
Cc: Thomas Haller <thaller@redhat.com>
Subject: [PATCH nft v2 3/3] tests/shell: skip "vlan_8021ad_tag" test on older kernels
Date: Tue, 17 Oct 2023 10:49:08 +0200 [thread overview]
Message-ID: <20231017085133.1203402-4-thaller@redhat.com> (raw)
In-Reply-To: <20231017085133.1203402-1-thaller@redhat.com>
The "vlan_8021ad_tag" test can only pass with certain (recent) kernels.
Conditionally exit with status 77, if "eval-exit-code" determines that
we don't have a suitable kernel version.
In this case, we can find the fixes in:
v6.6 : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af84f9e447a65b4b9f79e7e5d69e19039b431c56
v6.5.7 : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3f6a5636a96687381b329649950f21258bae380d
Fixes: 74cf3d16d8e9 ('tests: shell: add vlan match test case')
Signed-off-by: Thomas Haller <thaller@redhat.com>
---
tests/shell/testcases/packetpath/vlan_8021ad_tag | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/shell/testcases/packetpath/vlan_8021ad_tag b/tests/shell/testcases/packetpath/vlan_8021ad_tag
index 379a5710c1cb..6d908fe330df 100755
--- a/tests/shell/testcases/packetpath/vlan_8021ad_tag
+++ b/tests/shell/testcases/packetpath/vlan_8021ad_tag
@@ -47,4 +47,10 @@ EOF
ip netns exec "$ns1" ping -c 1 10.1.1.2
ip netns exec "$ns2" $NFT list ruleset
-ip netns exec "$ns2" $NFT list chain netdev t c | grep 'counter packets 1 bytes 84'
+OUT="$(ip netns exec "$ns2" $NFT list chain netdev t c)"
+
+if ! printf "%s" "$OUT" | grep -q 'counter packets 1 bytes 84' ; then
+ echo "Filter did not match. Missing https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af84f9e447a65b4b9f79e7e5d69e19039b431c56 ?"
+ "$NFT_TEST_BASEDIR/helpers/eval-exit-code" kernel 6.6 6.5.7
+ exit $?
+fi
--
2.41.0
next prev parent reply other threads:[~2023-10-17 8:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 8:49 [PATCH nft v2 0/3] add "eval-exit-code" and skip tests based on kernel version Thomas Haller
2023-10-17 8:49 ` [PATCH nft v2 1/3] tests/shell: add "tests/shell/helpers/eval-exit-code" Thomas Haller
2023-10-17 8:49 ` [PATCH nft v2 2/3] tests/shell: skip "table_onoff" test on older kernels Thomas Haller
2023-10-17 9:04 ` Pablo Neira Ayuso
2023-10-17 11:21 ` Thomas Haller
2023-10-17 11:40 ` Pablo Neira Ayuso
2023-10-17 12:43 ` Thomas Haller
2023-10-17 13:58 ` Pablo Neira Ayuso
2023-10-17 8:49 ` Thomas Haller [this message]
2023-10-17 9:24 ` [PATCH nft v2 0/3] add "eval-exit-code" and skip tests based on kernel version Florian Westphal
2023-10-17 20:41 ` Florian Westphal
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=20231017085133.1203402-4-thaller@redhat.com \
--to=thaller@redhat.com \
--cc=netfilter-devel@vger.kernel.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).