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