netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Štěpán Němec" <snemec@redhat.com>
To: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso <pablo@netfilter.org>
Cc: phil@nwl.cc
Subject: [PATCH nft v2 4/4] tests: shell: $NFT needs to be invoked unquoted
Date: Fri,  5 Nov 2021 12:39:11 +0100	[thread overview]
Message-ID: <20211105113911.153006-4-snemec@redhat.com> (raw)
In-Reply-To: <20211105113911.153006-1-snemec@redhat.com>

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>
---
 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 ea2b0b98f95f..3af17a9e72ca 100644
--- a/tests/shell/README
+++ b/tests/shell/README
@@ -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'
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" )
-- 
2.33.1


  parent reply	other threads:[~2021-11-05 11:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 12:45 [PATCH nft 1/3] tests: shell: README: copy edit Štěpán Němec
2021-10-20 12:45 ` [PATCH nft 2/3] tests: shell: README: $NFT does not have to be a path to a binary Štěpán Němec
2021-10-20 12:45 ` [PATCH nft 3/3] tests: shell: README: clarify test file name convention Štěpán Němec
2021-10-20 15:04 ` [PATCH nft 1/3] tests: shell: README: copy edit Phil Sutter
2021-10-21  8:30   ` Štěpán Němec
2021-10-21 10:26     ` Phil Sutter
2021-10-21 11:03       ` Štěpán Němec
2021-10-27  9:06         ` Pablo Neira Ayuso
2021-10-27  9:51           ` Štěpán Němec
2021-10-27 10:13             ` Pablo Neira Ayuso
2021-10-27 11:04               ` Štěpán Němec
2021-10-27 19:07                 ` Pablo Neira Ayuso
2021-11-05 11:39                   ` [PATCH nft v2 1/4] " Štěpán Němec
2021-11-05 11:39                     ` [PATCH nft v2 2/4] tests: shell: README: $NFT does not have to be a path to a binary Štěpán Němec
2021-11-05 11:39                     ` [PATCH nft v2 3/4] tests: shell: README: clarify test file name convention Štěpán Němec
2021-11-05 11:39                     ` Štěpán Němec [this message]
2021-11-05 13:22                     ` [PATCH nft v2 1/4] tests: shell: README: copy edit Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211105113911.153006-4-snemec@redhat.com \
    --to=snemec@redhat.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).