]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell: return 77/skip for tests that fail to create dummy device
authorThomas Haller <thaller@redhat.com>
Thu, 7 Sep 2023 21:13:43 +0000 (23:13 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 8 Sep 2023 09:41:02 +0000 (11:41 +0200)
There are some existing tests, that skip operation when they fail to
create a dummy interface. Use the new exit code 77 to indicate
"SKIPPED".

I wonder why creating a dummy device would ever fail and why we don't
just fail the test altogether in that case. But the patch does not
change that.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/testcases/chains/netdev_chain_0
tests/shell/testcases/json/netdev
tests/shell/testcases/listing/0020flowtable_0

index 67cd715fc59f77e14fbb7d28e6839cad8a4d8283..41e724413528528ca181fae44e7cdead0c526009 100755 (executable)
@@ -2,19 +2,19 @@
 
 ip link add d0 type dummy || {
         echo "Skipping, no dummy interface available"
-        exit 0
+        exit 77
 }
 trap "ip link del d0" EXIT
 
 ip link add d1 type dummy || {
         echo "Skipping, no dummy interface available"
-        exit 0
+        exit 77
 }
 trap "ip link del d1" EXIT
 
 ip link add d2 type dummy || {
         echo "Skipping, no dummy interface available"
-        exit 0
+        exit 77
 }
 trap "ip link del d2" EXIT
 
index a16a4f5e030e1d1950ea529b46459159aec7c380..9f6033810b558a865b339fa6f0814f0e5c74f2a8 100755 (executable)
@@ -2,7 +2,7 @@
 
 ip link add d0 type dummy || {
         echo "Skipping, no dummy interface available"
-        exit 0
+        exit 77
 }
 trap "ip link del d0" EXIT
 
index 47488d8ea92a46410e6cbdad6f64a4bc2b57a101..210289d70415c2427849f410921d6b504eecbef4 100755 (executable)
@@ -43,7 +43,7 @@ EXPECTED3="table ip filter {
 
 ip link add d0 type dummy || {
        echo "Skipping, no dummy interface available"
-       exit 0
+       exit 77
 }
 trap "ip link del d0" EXIT