tests/shell: return 77/skip for tests that fail to create dummy device
PATCH 1/1 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 <[email protected]>
--- 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(-)
tests/shell/testcases/chains/netdev_chain_0 +3 -3
@@ -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
tests/shell/testcases/json/netdev +1 -1
@@ -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
tests/shell/testcases/listing/0020flowtable_0 +1 -1
@@ -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
Signature · 1 line
2.41.0