* [PATCH nft] tests: shell: $NFT needs to be invoked unquoted
@ 2021-10-21 17:54 Štěpán Němec
2021-11-02 11:37 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Štěpán Němec @ 2021-10-21 17:54 UTC (permalink / raw)
To: netfilter-devel, Pablo Neira Ayuso; +Cc: phil
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>
---
The test I added (0068) is the only problematic occurrence.
This would be best applied on top of the README series (otherwise
the README still talks about $NFT being a path to a binary).
tests/shell/README | 3 +++
tests/shell/testcases/sets/0068interval_stack_overflow_0 | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/shell/README b/tests/shell/README
index 07d5cc2e3e7c..2a6f224f6fc9 100644
--- a/tests/shell/README
+++ b/tests/shell/README
@@ -30,4 +30,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'
diff --git a/tests/shell/testcases/sets/0068interval_stack_overflow_0 b/tests/shell/testcases/sets/0068interval_stack_overflow_0
index 134282de2826..6620572449c3 100755
--- a/tests/shell/testcases/sets/0068interval_stack_overflow_0
+++ b/tests/shell/testcases/sets/0068interval_stack_overflow_0
@@ -26,4 +26,4 @@ table inet test68_table {
}
EOF
-( ulimit -s 128 && "$NFT" -f "$ruleset_file" )
+( ulimit -s 128 && $NFT -f "$ruleset_file" )
base-commit: d8ccad2a2b73c4189934eb5fd0e3d096699b5043
prerequisite-patch-id: fa363c8411ae8d859aadb73624b07008564db275
prerequisite-patch-id: 8b6016a2f32a72dacadaad08c5f48d4897adf816
prerequisite-patch-id: e2e3c6baa8d81d2da42a32bcd76d8ffd4ad24921
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH nft] tests: shell: $NFT needs to be invoked unquoted
2021-10-21 17:54 [PATCH nft] tests: shell: $NFT needs to be invoked unquoted Štěpán Němec
@ 2021-11-02 11:37 ` Pablo Neira Ayuso
2021-11-05 11:41 ` Štěpán Němec
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2021-11-02 11:37 UTC (permalink / raw)
To: Štěpán Němec; +Cc: netfilter-devel, phil
On Thu, Oct 21, 2021 at 07:54:38PM +0200, Štěpán Němec wrote:
> 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>
> ---
> The test I added (0068) is the only problematic occurrence.
>
> This would be best applied on top of the README series (otherwise
> the README still talks about $NFT being a path to a binary).
OK, then I'll mark this one as "Changed Requested" and will wait for
you to include this one in the v2 of you README series.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH nft] tests: shell: $NFT needs to be invoked unquoted
2021-11-02 11:37 ` Pablo Neira Ayuso
@ 2021-11-05 11:41 ` Štěpán Němec
0 siblings, 0 replies; 3+ messages in thread
From: Štěpán Němec @ 2021-11-05 11:41 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, phil
On Tue, 02 Nov 2021 12:37:26 +0100
Pablo Neira Ayuso wrote:
>> This would be best applied on top of the README series (otherwise
>> the README still talks about $NFT being a path to a binary).
>
> OK, then I'll mark this one as "Changed Requested" and will wait for
> you to include this one in the v2 of you README series.
Resubmitted now as <20211105113911.153006-4-snemec@redhat.com>.
Thanks,
Štěpán
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-05 11:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-21 17:54 [PATCH nft] tests: shell: $NFT needs to be invoked unquoted Štěpán Němec
2021-11-02 11:37 ` Pablo Neira Ayuso
2021-11-05 11:41 ` Štěpán Němec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).