]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
tests: Fix skipping for recent nft-only tests
authorPhil Sutter <phil@nwl.cc>
Thu, 9 Aug 2018 16:06:28 +0000 (18:06 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 9 Aug 2018 19:46:45 +0000 (21:46 +0200)
In an attempt to sanitize shell scripting, exit test in recent testcases
was altered, which led to them being skipped even in nft test runs. Drop
the quotes so that globbing happens again.

While here, improve the check a bit to glob only on leading path part,
not also the file name. Also print "skip ..." just like
nft-only/0001compat_0 testcase does.

Fixes: f1d8508fd6fdc ("tests: Add arptables-{save,restore} testcases")
Fixes: fbf0bf7c079d8 ("tests: Add ebtables-{save,restore} testcases")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/tests/shell/testcases/arptables/0001-arptables-save-restore_0
iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0
iptables/tests/shell/testcases/ebtables/0002-ebtables-save-restore_0
iptables/tests/shell/testcases/ebtables/0003-ebtables-restore-defaults_0

index 49baab5b505c74db2659fd88f09c45bd446e39b6..67265c83f1ef8897dfd1f2a789950cedc48adf76 100755 (executable)
@@ -4,7 +4,7 @@ set -e
 #set -x
 
 # there is no legacy backend to test
-[[ $XT_MULTI == "*xtables-nft-multi" ]] || exit 0
+[[ $XT_MULTI == */xtables-nft-multi ]] || { echo "skip $XT_MULTI"; exit 0; }
 
 # fill arptables manually
 
index 8bc4d08fc0726ee31adeee1a5d6842f065b0bded..b2ed95e87bb401d57ed1d1aeeab214a23b7c5a4f 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 
 # there is no legacy backend to test
-[[ $XT_MULTI == "*xtables-nft-multi" ]] || exit 0
+[[ $XT_MULTI == */xtables-nft-multi ]] || { echo "skip $XT_MULTI"; exit 0; }
 
 # arptables-restore reuses preloaded targets and matches, make sure defaults
 # apply to consecutive rules using the same target/match as a previous one
index 0c4c2947c04d4033b04a909d263e24f20a020741..1de76840a8432819cd428168bb4e954c9be12c76 100755 (executable)
@@ -4,7 +4,7 @@ set -e
 #set -x
 
 # there is no legacy backend to test
-[[ $XT_MULTI == "*xtables-nft-multi" ]] || exit 0
+[[ $XT_MULTI == */xtables-nft-multi ]] || { echo "skip $XT_MULTI"; exit 0; }
 
 # fill ebtables manually
 
index 8f7e7da0c7caa4cff2a2e62c3862a92809e89f83..d82bae549212f3250731f8a4d46e50d5fb648325 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 
 # there is no legacy backend to test
-[[ $XT_MULTI == "*xtables-nft-multi" ]] || exit 0
+[[ $XT_MULTI == */xtables-nft-multi ]] || { echo "skip $XT_MULTI"; exit 0; }
 
 # ebtables-restore reuses preloaded targets and matches, make sure defaults
 # apply to consecutive rules using the same target/match as a previous one