summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/chains/netdev_chain_autoremove
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-09-18 12:28:21 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-18 13:08:47 +0200
commit362039ad507b6bc5b9a0a2c4b6eb9e8911563e04 (patch)
tree05e02ead3ec882f1810a302364876d3ffb159ce5 /tests/shell/testcases/chains/netdev_chain_autoremove
parent7359704b708b34bb0604e676d0945063d5e57800 (diff)
tests/shell: skip inet ingress tests if kernel lacks support
Split the bridge autoremove test to a new file. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'tests/shell/testcases/chains/netdev_chain_autoremove')
-rwxr-xr-xtests/shell/testcases/chains/netdev_chain_autoremove9
1 files changed, 9 insertions, 0 deletions
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\; } ; \
+"