syscalls/setrlimit06: lower RLIMIT_CPU parameters
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>
Reviewed-by: Xiao Yang <ice_yangxiao@163.com>
Acked-by: Li Wang <liwang@redhat.com>
diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit06.c b/testcases/kernel/syscalls/setrlimit/setrlimit06.c
index 726b268..3e5bf1d 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit06.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit06.c
@@ -59,8 +59,8 @@
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 @@
exit(1);
}
- alarm(10);
+ alarm(20);
while (1);
}