summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-09-07 23:13:43 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-08 11:41:02 +0200
commit20776aa335a7835a12a06c36b1a0d816e837a7c8 (patch)
tree6797d448b0452f0473168af5f870ca8ffc926131
parent6de0a8f29ddb0be4dfaa5f86bc92433cf1713bc6 (diff)
tests/shell: return 77/skip for tests that fail to create dummy device
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>
-rwxr-xr-xtests/shell/testcases/chains/netdev_chain_06
-rwxr-xr-xtests/shell/testcases/json/netdev2
-rwxr-xr-xtests/shell/testcases/listing/0020flowtable_02
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 67cd715f..41e72441 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 a16a4f5e..9f603381 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 47488d8e..210289d7 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