netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Haller <thaller@redhat.com>
To: NetFilter <netfilter-devel@vger.kernel.org>
Cc: Thomas Haller <thaller@redhat.com>
Subject: [PATCH nft 2/3] tests/shell: skip "vlan_8021ad_tag" test instead of failing
Date: Mon, 16 Oct 2023 15:12:08 +0200	[thread overview]
Message-ID: <20231016131209.1127298-2-thaller@redhat.com> (raw)
In-Reply-To: <20231016131209.1127298-1-thaller@redhat.com>

The test "vlan_8021ad_tag" requires recent kernel patches to pass. This
makes the test suite unusable to contributors, who don't also run the
required kernel.

Instead of failing, just skip the test.

If you run with a kernel that is supposed to pass all tests, consider
setting NFT_TEST_FAIL_ON_SKIP=y.

Fixes: 74cf3d16d8e9 ('tests: shell: add vlan match test case')
Signed-off-by: Thomas Haller <thaller@redhat.com>
---
 tests/shell/testcases/packetpath/vlan_8021ad_tag | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/shell/testcases/packetpath/vlan_8021ad_tag b/tests/shell/testcases/packetpath/vlan_8021ad_tag
index 379a5710c1cb..246427062323 100755
--- a/tests/shell/testcases/packetpath/vlan_8021ad_tag
+++ b/tests/shell/testcases/packetpath/vlan_8021ad_tag
@@ -47,4 +47,9 @@ 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. Assume kernel lacks fix https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af84f9e447a65b4b9f79e7e5d69e19039b431c56"
+	exit 77
+fi
-- 
2.41.0


  reply	other threads:[~2023-10-16 13:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 13:12 [PATCH nft 1/3] tests/shell: skip "table_onoff" test if kernel patch is missing Thomas Haller
2023-10-16 13:12 ` Thomas Haller [this message]
2023-10-16 13:12 ` [PATCH nft 3/3] tests/shell: add missing "vlan_8021ad_tag.nodump" file Thomas Haller
2023-10-16 20:20 ` [PATCH nft 1/3] tests/shell: skip "table_onoff" test if kernel patch is missing Florian Westphal
2023-10-17  6:22   ` Thomas Haller
2023-10-17  8:53     ` Thomas Haller
2023-10-17  9:32     ` Florian Westphal
2023-10-17 11:14       ` Thomas Haller

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=20231016131209.1127298-2-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).