From 362039ad507b6bc5b9a0a2c4b6eb9e8911563e04 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 18 Sep 2023 12:28:21 +0200 Subject: tests/shell: skip inet ingress tests if kernel lacks support Split the bridge autoremove test to a new file. Signed-off-by: Florian Westphal Signed-off-by: Thomas Haller --- tests/shell/testcases/chains/netdev_chain_autoremove | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 tests/shell/testcases/chains/netdev_chain_autoremove (limited to 'tests/shell/testcases/chains/netdev_chain_autoremove') diff --git a/tests/shell/testcases/chains/netdev_chain_autoremove b/tests/shell/testcases/chains/netdev_chain_autoremove new file mode 100755 index 00000000..21f3ad29 --- /dev/null +++ b/tests/shell/testcases/chains/netdev_chain_autoremove @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +# Test auto-removal of chain hook on netns removal +unshare -n bash -e -c "ip link add br0 type bridge; \ + $NFT add table netdev test; \ + $NFT add chain netdev test ingress { type filter hook ingress device \"br0\" priority 0\; policy drop\; } ; \ +" -- cgit v1.2.3