|
|
252916 |
From b297f75275737de3e16b5d14916efe35535b6279 Mon Sep 17 00:00:00 2001
|
|
|
252916 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
252916 |
Date: Wed, 8 Dec 2021 14:10:54 +0100
|
|
|
252916 |
Subject: [PATCH] tests: shell: better parameters for the interval stack
|
|
|
252916 |
overflow test
|
|
|
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 7b81d9cb094ff
|
|
|
252916 |
|
|
|
252916 |
commit 7b81d9cb094ffa96ad821528cf19269dc348f617
|
|
|
252916 |
Author: Štěpán Němec <snemec@redhat.com>
|
|
|
252916 |
Date: Wed Dec 1 12:12:00 2021 +0100
|
|
|
252916 |
|
|
|
252916 |
tests: shell: better parameters for the interval stack overflow test
|
|
|
252916 |
|
|
|
252916 |
Wider testing has shown that 128 kB stack is too low (e.g. for systems
|
|
|
252916 |
with 64 kB page size), leading to false failures in some environments.
|
|
|
252916 |
|
|
|
252916 |
Based on results from a matrix of RHEL 8 and RHEL 9 systems across
|
|
|
252916 |
x86_64, aarch64, ppc64le and s390x architectures as well as some
|
|
|
252916 |
anecdotal testing of other Linux distros on x86_64 machines, 400 kB
|
|
|
252916 |
seems safe: the normal nft stack (which should stay constant during
|
|
|
252916 |
this test) on all tested systems doesn't exceed 200 kB (stays around
|
|
|
252916 |
100 kB on typical systems with 4 kB page size), while always growing
|
|
|
252916 |
beyond 500 kB in the failing case (nftables before baecd1cf2685) with
|
|
|
252916 |
the increased set size.
|
|
|
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/testcases/sets/0068interval_stack_overflow_0 | 4 ++--
|
|
|
252916 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
252916 |
|
|
|
252916 |
diff --git a/tests/shell/testcases/sets/0068interval_stack_overflow_0 b/tests/shell/testcases/sets/0068interval_stack_overflow_0
|
|
|
252916 |
index 6620572..2cbc986 100755
|
|
|
252916 |
--- a/tests/shell/testcases/sets/0068interval_stack_overflow_0
|
|
|
252916 |
+++ b/tests/shell/testcases/sets/0068interval_stack_overflow_0
|
|
|
252916 |
@@ -9,7 +9,7 @@ trap 'rm -f "$ruleset_file"' EXIT
|
|
|
252916 |
{
|
|
|
252916 |
echo 'define big_set = {'
|
|
|
252916 |
for ((i = 1; i < 255; i++)); do
|
|
|
252916 |
- for ((j = 1; j < 80; j++)); do
|
|
|
252916 |
+ for ((j = 1; j < 255; j++)); do
|
|
|
252916 |
echo "10.0.$i.$j,"
|
|
|
252916 |
done
|
|
|
252916 |
done
|
|
|
252916 |
@@ -26,4 +26,4 @@ table inet test68_table {
|
|
|
252916 |
}
|
|
|
252916 |
EOF
|
|
|
252916 |
|
|
|
252916 |
-( ulimit -s 128 && $NFT -f "$ruleset_file" )
|
|
|
252916 |
+( ulimit -s 400 && $NFT -f "$ruleset_file" )
|
|
|
252916 |
--
|
|
|
252916 |
2.31.1
|
|
|
252916 |
|