Message ID | CAKWYkK3a-Qp5bZNyL67JkTtzD=_55c0tk7eb69rsikYr+r=QqA@mail.gmail.com |
---|---|
State | Rejected |
Headers | show |
Series | msgstress03: "Fork failed (may be OK if under stress)" problem observed on qemu. | expand |
Hi! Hi! > The reason why other test-cases like msgstress04 dont fail is because > the nprocs value is set with a different calculation. > Specifically, I observe that the msgstress04 testcase uses only > free_pids / 2 pids instead of the full free_pids number of processes. > > Can someone confirm my findings ? If needed I can also send out a > patch with my above nprocs/2 changes if required. > Or, if there is any better fix or opinion kindly reply back to us. Actually these test are broken much more than this, they need to be redesigned and rewritten properly. There is even a work-in-progress patchset, but unfortunatelly it wasn't updated for nearly a year, see: https://patchwork.ozlabs.org/project/ltp/list/?series=233661 https://github.com/linux-test-project/ltp/issues/509
Thanks for the quick response. Any idea when changes to these test-cases is merged in the mainline ? On Fri, Jan 21, 2022 at 2:39 PM Cyril Hrubis <chrubis@suse.cz> wrote: > > Hi! > Hi! > > The reason why other test-cases like msgstress04 dont fail is because > > the nprocs value is set with a different calculation. > > Specifically, I observe that the msgstress04 testcase uses only > > free_pids / 2 pids instead of the full free_pids number of processes. > > > > Can someone confirm my findings ? If needed I can also send out a > > patch with my above nprocs/2 changes if required. > > Or, if there is any better fix or opinion kindly reply back to us. > > Actually these test are broken much more than this, they need to be > redesigned and rewritten properly. There is even a work-in-progress > patchset, but unfortunatelly it wasn't updated for nearly a year, see: > > https://patchwork.ozlabs.org/project/ltp/list/?series=233661 > > https://github.com/linux-test-project/ltp/issues/509 > > -- > Cyril Hrubis > chrubis@suse.cz
Hi! > Thanks for the quick response. Any idea when changes to these > test-cases is merged in the mainline ? The current patchset is not finished, so unless somebody picks up the patchset to finish it it's not going to get merged at all...
diff --git a/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c b/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c index 3cb70ab18..75cfc109d 100644 --- a/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c +++ b/testcases/kernel/syscalls/ipc/msgstress/msgstress03.c @@ -131,7 +131,7 @@ int main(int argc, char **argv) /* Set up array of unique keys for use in allocating message * queues */ - for (i = 0; i < nprocs; i++) { + for (i = 0; i < nprocs/2; i++) { ok = 1; do { /* Get random key */ @@ -157,7 +157,7 @@ int main(int argc, char **argv) * of random length messages with specific values. */ - for (i = 0; i < nprocs; i++) { + for (i = 0; i < nprocs/2; i++) { fflush(stdout); if ((pid = FORK_OR_VFORK()) < 0) { tst_brkm(TFAIL, @@ -191,11 +191,11 @@ int main(int argc, char **argv) } } /* Make sure proper number of children exited */ - if (count != nprocs) { + if (count != nprocs/2) { tst_brkm(TFAIL, NULL, "Wrong number of children exited, Saw %d, Expected %d", - count, nprocs); + count, nprocs/2); } The reason why other test-cases like msgstress04 dont fail is because