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