[LTP] [PATCH 09/13] syscalls/setsockopt08: Add .iterations = 100

Cyril Hrubis chrubis@suse.cz
Wed Jun 24 11:18:56 CEST 2026


This moves the number of iterations from the cve runtest file to the
actual test. This unifies the test default settings across different
runtest files since the number of iterations is now encoded in the test
rather than in the runtest file.

The reason I moved the iterations into the test is that if we need 100
iterations to reproducibly trigger the bug it does not make much sense
to run only single iteration in the syscalls runtest file.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 runtest/cve                                         | 2 +-
 testcases/kernel/syscalls/setsockopt/setsockopt08.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/runtest/cve b/runtest/cve
index ca9994868..5f29d1686 100644
--- a/runtest/cve
+++ b/runtest/cve
@@ -77,7 +77,7 @@ cve-2021-4034 execve06
 cve-2021-4197_1 cgroup_core01
 cve-2021-4197_2 cgroup_core02
 cve-2021-4204 bpf_prog06
-cve-2021-22555 setsockopt08 -i 100
+cve-2021-22555 setsockopt08
 cve-2021-26708 vsock01
 cve-2021-22600 setsockopt09
 cve-2021-38604 mq_notify03
diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt08.c b/testcases/kernel/syscalls/setsockopt/setsockopt08.c
index 2578638df..5b324cb46 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt08.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt08.c
@@ -146,6 +146,7 @@ static struct tst_test test = {
 	.test_all = run,
 	.taint_check = TST_TAINT_W | TST_TAINT_D,
 	.forks_child = 1,
+	.iterations = 100,
 	.bufs = (struct tst_buffers []) {
 		{&buffer, .size = 2048},
 		{},
-- 
2.53.0



More information about the ltp mailing list