public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/setrlimit06: lower RLIMIT_CPU parameters
@ 2020-02-10 12:47 Jan Stancek
  2020-02-10 13:50 ` Xiao Yang
  2020-02-11  8:49 ` Li Wang
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Stancek @ 2020-02-10 12:47 UTC (permalink / raw)
  To: ltp

Lower the parameters so that test completes faster where possible.

This also increases alarm timer slightly, which in combination with
lower RLIMIT_CPU aims to avoid false positives in environments with
high steal time, where it can take multiple of wall clock seconds
to spend single second on a cpu.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/kernel/syscalls/setrlimit/setrlimit06.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit06.c b/testcases/kernel/syscalls/setrlimit/setrlimit06.c
index 726b26841583..3e5bf1d4253d 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit06.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit06.c
@@ -59,8 +59,8 @@ static void verify_setrlimit(void)
 	pid = SAFE_FORK();
 	if (!pid) {
 		struct rlimit rlim = {
-			.rlim_cur = 2,
-			.rlim_max = 3,
+			.rlim_cur = 1,
+			.rlim_max = 2,
 		};
 
 		TEST(setrlimit(RLIMIT_CPU, &rlim));
@@ -70,7 +70,7 @@ static void verify_setrlimit(void)
 			exit(1);
 		}
 
-		alarm(10);
+		alarm(20);
 
 		while (1);
 	}
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-02-11 12:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 12:47 [LTP] [PATCH] syscalls/setrlimit06: lower RLIMIT_CPU parameters Jan Stancek
2020-02-10 13:50 ` Xiao Yang
2020-02-11  8:49 ` Li Wang
2020-02-11 10:52   ` Jan Stancek
2020-02-11 11:53     ` Li Wang
2020-02-11 12:10       ` Jan Stancek
2020-02-11 12:18         ` Li Wang
2020-02-11 12:39           ` Jan Stancek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox