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

Cyril Hrubis <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
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 <[email protected]>
---
 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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.