]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: remove RETURNCODE_SEPARATOR
authorFlorian Westphal <fw@strlen.de>
Fri, 4 Jan 2019 15:25:41 +0000 (16:25 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 4 Jan 2019 15:25:41 +0000 (16:25 +0100)
test files are located via find + a pattern search that looks for
_[0-9].  Previous change makes all test scripts return 0 when the
test case is supposed to pass, so the foo_$retval name is no longer
needed.

Update script to look for all executeables in the 'testcases' directory.
This makes it necessary to make two dump-files non-executeable.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/run-tests.sh
tests/shell/testcases/flowtable/dumps/0001flowtable_0.nft [changed mode: 0755->0644]
tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft [changed mode: 0755->0644]

index 6b693cc154c40d0e5dd102c0752e2d0cf2bf82df..81ee0cdd62f4a6a9acc0a359699ed3fec6bb16b1 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/bash
 
 # Configuration
-TESTDIR="./$(dirname $0)/"
-RETURNCODE_SEPARATOR="_"
+TESTDIR="./$(dirname $0)/testcases"
 SRC_NFT="$(dirname $0)/../../src/nft"
 DIFF=$(which diff)
 
@@ -55,12 +54,8 @@ if [ "$1" == "-g" ] ; then
 fi
 
 for arg in "$@"; do
-       if grep ^.*${RETURNCODE_SEPARATOR}[0-9]\\+$ <<< $arg >/dev/null ; then
-               SINGLE+=" $arg"
-               VERBOSE=y
-       else
-               msg_error "unknown parameter '$arg'"
-       fi
+       SINGLE+=" $arg"
+       VERBOSE=y
 done
 
 kernel_cleanup() {
@@ -90,8 +85,7 @@ find_tests() {
                echo $SINGLE
                return
        fi
-       ${FIND} ${TESTDIR} -executable -regex \
-               .*${RETURNCODE_SEPARATOR}[0-9]+ | sort
+       ${FIND} ${TESTDIR} -type f -executable | sort
 }
 
 echo ""