This fixes two tests that were failing in our debian distribution because of a PID limit imposed by systemd which was not properly detected.
This was fixed by adding another file to read the max_pid from that should be available everywhere.
This worked for msgstress04, but doing some testing msgstress03 still hit the limit. Printing the number of PIDs in use, it seems like msgstress03 had some accounting issues, the real number of PIDs in use always being 5-10% greater than what it thought it was. Not finding where this accounting error was, I reduced the number of free PIDs by 10% which proved to do the trick.
I'm not too sure about these solutions and would be happy to receive some feedback, hence the RFC state. (It might make sense to split the patch as well, but it would be two very small diffs.)
Thanks in advance !
Teo Couprie Diaz (1): lib/tst_pid: Add a new file to get pid_max
lib/tst_pid.c | 4 ++++ testcases/kernel/syscalls/ipc/msgstress/msgstress03.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)