Blame SOURCES/0070-tests-shell-better-parameters-for-the-interval-stack.patch

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