<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 10, 2020 at 8:47 PM Jan Stancek <<a href="mailto:jstancek@redhat.com">jstancek@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Lower the parameters so that test completes faster where possible.<br>
<br>
This also increases alarm timer slightly, which in combination with<br>
lower RLIMIT_CPU aims to avoid false positives in environments with<br>
high steal time, where it can take multiple of wall clock seconds<br>
to spend single second on a cpu.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">This patch could reduce the test failure possibility, but I'm afraid it can't fix the problem radically, because with `stress -c 20' to overload an s390x system(2cpus) in the background then setrlimit06(patched) still easily gets failed:</div></div><div><div class="gmail_default" style="font-size:small"> setrlimit06.c:98: FAIL: Got only SIGXCPU after reaching both limit </div></div></div><div><br></div><div><div class="gmail_default" style="font-size:small">Another way I can think of is to raise the priority before its running, not sure if that will disturb the original test but from my test, it always gets a pass even with too much overload.</div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--- a/testcases/kernel/syscalls/setrlimit/setrlimit06.c<br>+++ b/testcases/kernel/syscalls/setrlimit/setrlimit06.c<br>@@ -25,6 +25,7 @@<br> #include <sys/wait.h><br> #include <stdlib.h><br> #include <sys/mman.h><br>+#include <sys/resource.h><br> <br> #include "tst_test.h"<br> <br>@@ -37,6 +38,8 @@ static void sighandler(int sig)<br> <br> static void setup(void)<br> {<br>+ setpriority(PRIO_PROCESS, 0, -20);<br>+<br> SAFE_SIGNAL(SIGXCPU, sighandler);<br> <br> end = SAFE_MMAP(NULL, sizeof(int), PROT_READ | PROT_WRITE,<br>@@ -110,6 +113,7 @@ static void verify_setrlimit(void)<br> }<br> <br> static struct tst_test test = {<br>+ .needs_root = 1,<br> .test_all = verify_setrlimit,<br> .setup = setup,<br> .cleanup = cleanup,<br></div><div class="gmail_default" style="font-size:small"><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>