Blame SOURCES/0069-tests-shell-NFT-needs-to-be-invoked-unquoted.patch

4b9c63
From ea4457d5c329c8930c610ef3002cfe42bf8a263f Mon Sep 17 00:00:00 2001
4b9c63
From: Phil Sutter <psutter@redhat.com>
4b9c63
Date: Wed, 8 Dec 2021 14:10:31 +0100
4b9c63
Subject: [PATCH] tests: shell: $NFT needs to be invoked unquoted
4b9c63
MIME-Version: 1.0
4b9c63
Content-Type: text/plain; charset=UTF-8
4b9c63
Content-Transfer-Encoding: 8bit
4b9c63
4b9c63
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1908127
4b9c63
Upstream Status: nftables commit dad3338f1f76a
4b9c63
Conflicts: Context change in README due to missing other commits.
4b9c63
4b9c63
commit dad3338f1f76a4a5bd782bae9c6b48941dfb1e31
4b9c63
Author: Štěpán Němec <snemec@redhat.com>
4b9c63
Date:   Fri Nov 5 12:39:11 2021 +0100
4b9c63
4b9c63
    tests: shell: $NFT needs to be invoked unquoted
4b9c63
4b9c63
    The variable has to undergo word splitting, otherwise the shell tries
4b9c63
    to find the variable value as an executable, which breaks in cases that
4b9c63
    7c8a44b25c22 ("tests: shell: Allow wrappers to be passed as nft command")
4b9c63
    intends to support.
4b9c63
4b9c63
    Mention this in the shell tests README.
4b9c63
4b9c63
    Fixes: d8ccad2a2b73 ("tests: cover baecd1cf2685 ("segtree: Fix segfault when restoring a huge interval set")")
4b9c63
    Signed-off-by: Štěpán Němec <snemec@redhat.com>
4b9c63
    Signed-off-by: Phil Sutter <phil@nwl.cc>
4b9c63
---
4b9c63
 tests/shell/README                                       | 3 +++
4b9c63
 tests/shell/testcases/sets/0068interval_stack_overflow_0 | 2 +-
4b9c63
 2 files changed, 4 insertions(+), 1 deletion(-)
4b9c63
4b9c63
diff --git a/tests/shell/README b/tests/shell/README
4b9c63
index e0279bb..aee50e3 100644
4b9c63
--- a/tests/shell/README
4b9c63
+++ b/tests/shell/README
4b9c63
@@ -25,4 +25,7 @@ path to the nftables binary being tested.
4b9c63
 You can pass an arbitrary $NFT value as well:
4b9c63
  # NFT=/usr/local/sbin/nft ./run-tests.sh
4b9c63
 
4b9c63
+Note that, to support usage such as NFT='valgrind nft', tests must
4b9c63
+invoke $NFT unquoted.
4b9c63
+
4b9c63
 By default the tests are run with the nft binary at '../../src/nft'
4b9c63
diff --git a/tests/shell/testcases/sets/0068interval_stack_overflow_0 b/tests/shell/testcases/sets/0068interval_stack_overflow_0
4b9c63
index 134282d..6620572 100755
4b9c63
--- a/tests/shell/testcases/sets/0068interval_stack_overflow_0
4b9c63
+++ b/tests/shell/testcases/sets/0068interval_stack_overflow_0
4b9c63
@@ -26,4 +26,4 @@ table inet test68_table {
4b9c63
 }
4b9c63
 EOF
4b9c63
 
4b9c63
-( ulimit -s 128 && "$NFT" -f "$ruleset_file" )
4b9c63
+( ulimit -s 128 && $NFT -f "$ruleset_file" )
4b9c63
-- 
4b9c63
2.31.1
4b9c63