]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: $NFT needs to be invoked unquoted
authorŠtěpán Němec <snemec@redhat.com>
Fri, 5 Nov 2021 11:39:11 +0000 (12:39 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 5 Nov 2021 13:21:26 +0000 (14:21 +0100)
The variable has to undergo word splitting, otherwise the shell tries
to find the variable value as an executable, which breaks in cases that
7c8a44b25c22 ("tests: shell: Allow wrappers to be passed as nft command")
intends to support.

Mention this in the shell tests README.

Fixes: d8ccad2a2b73 ("tests: cover baecd1cf2685 ("segtree: Fix segfault when restoring a huge interval set")")
Signed-off-by: Štěpán Němec <snemec@redhat.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/shell/README
tests/shell/testcases/sets/0068interval_stack_overflow_0

index ea2b0b98f95f50a00c82c079778d228b47677286..3af17a9e72ca61e9a90f104877d6d20a156b59c7 100644 (file)
@@ -29,4 +29,7 @@ which contains the nft command being tested.
 You can pass an arbitrary $NFT value as well:
  # NFT=/usr/local/sbin/nft ./run-tests.sh
 
+Note that, to support usage such as NFT='valgrind nft', tests must
+invoke $NFT unquoted.
+
 By default, the tests are run with the nft binary at '../../src/nft'
index 134282de282688d06dfaa282f96cb45950cf57e3..6620572449c3ca3d920bb3fce86f6c3055cfa780 100755 (executable)
@@ -26,4 +26,4 @@ table inet test68_table {
 }
 EOF
 
-( ulimit -s 128 && "$NFT" -f "$ruleset_file" )
+( ulimit -s 128 && $NFT -f "$ruleset_file" )