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

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