Commit 8094426a authored by Marek Chalupa's avatar Marek Chalupa Committed by Bryce Harrington
Browse files

test-runner: wait for concrete pid

After running a test in fork, we were waiting for any child to terminate.
It is OK unless the child forks again. If the child calls fork, the waitid can
catch the child's child termination, stop block and run another test
while the former test is still running. This is racy i. e. when adding socket.
Since we have test compositor which uses fork, this situation can occur
pretty frequently.
Signed-off-by: default avatarMarek Chalupa <>
Reviewed-by: default avatarJon A. Cruz <>
Reviewed-by: Daniel Stone's avatarDaniel Stone <>
parent 48bf640d
......@@ -351,7 +351,7 @@ int main(int argc, char *argv[])
if (pid == 0)
run_test(t); /* never returns */
if (waitid(P_ALL, 0, &info, WEXITED)) {
if (waitid(P_PID, pid, &info, WEXITED)) {
fprintf(stderr, "waitid failed: %m\n");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment