[PATCH nft] tests/shell: return 77/skip for tests that fail to create dummy device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 tests/shell/testcases/chains/netdev_chain_0   | 6 +++---
 tests/shell/testcases/json/netdev             | 2 +-
 tests/shell/testcases/listing/0020flowtable_0 | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/shell/testcases/chains/netdev_chain_0 b/tests/shell/testcases/chains/netdev_chain_0
index 67cd715fc59f..41e724413528 100755
--- a/tests/shell/testcases/chains/netdev_chain_0
+++ b/tests/shell/testcases/chains/netdev_chain_0
@@ -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
 
diff --git a/tests/shell/testcases/json/netdev b/tests/shell/testcases/json/netdev
index a16a4f5e030e..9f6033810b55 100755
--- a/tests/shell/testcases/json/netdev
+++ b/tests/shell/testcases/json/netdev
@@ -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
 
diff --git a/tests/shell/testcases/listing/0020flowtable_0 b/tests/shell/testcases/listing/0020flowtable_0
index 47488d8ea92a..210289d70415 100755
--- a/tests/shell/testcases/listing/0020flowtable_0
+++ b/tests/shell/testcases/listing/0020flowtable_0
@@ -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
 
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux