summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/0020flowtable_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/listing/0020flowtable_0')
-rwxr-xr-xtests/shell/testcases/listing/0020flowtable_014
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/shell/testcases/listing/0020flowtable_0 b/tests/shell/testcases/listing/0020flowtable_0
index 47488d8e..0e89f5dd 100755
--- a/tests/shell/testcases/listing/0020flowtable_0
+++ b/tests/shell/testcases/listing/0020flowtable_0
@@ -1,7 +1,11 @@
#!/bin/bash
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_flowtable_no_devices)
+
# list only the flowtable asked for with table
+set -e
+
FLOWTABLES="flowtable f {
hook ingress priority filter
devices = { lo }
@@ -41,13 +45,13 @@ EXPECTED3="table ip filter {
}
}"
-ip link add d0 type dummy || {
- echo "Skipping, no dummy interface available"
- exit 0
+iface_cleanup() {
+ ip link del d0 &>/dev/null || :
}
-trap "ip link del d0" EXIT
+trap 'iface_cleanup' EXIT
+iface_cleanup
-set -e
+ip link add d0 type dummy
$NFT -f - <<< "$RULESET"