From 2b2b7948c1960ba4680677664ff58477be869de6 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 12 Feb 2020 21:26:06 +0100 Subject: tests: shell: Fix skip checks with --host mode When testing host binaries, XT_MULTI variable contains just the program name without path component which most skip checks didn't expect. Fix them, and while being at it also reduce indenting level in two scripts by moving the skip check up front with an early exit call. Fixes: 416898e335322 ("tests/shell: Support testing host binaries") Signed-off-by: Phil Sutter --- .../tests/shell/testcases/arptables/0002-arptables-restore-defaults_0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0') diff --git a/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0 b/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0 index 38d387f3..afd0fcb4 100755 --- a/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0 +++ b/iptables/tests/shell/testcases/arptables/0002-arptables-restore-defaults_0 @@ -3,7 +3,7 @@ set -e # there is no legacy backend to test -[[ $XT_MULTI == */xtables-nft-multi ]] || { echo "skip $XT_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 -- cgit v1.2.3