diff options
| author | Marek Chalupa <mchqwerty@gmail.com> | 2015-02-02 10:40:21 +0100 |
|---|---|---|
| committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-02-04 19:43:08 -0800 |
| commit | 8094426a4168b78b924210e97ef178c78c1d296f (patch) | |
| tree | 8aee6200e9f666e9972fc20eb356de2d3454ff6d /tests/test-runner.c | |
| parent | configure.ac: re-bump version to 1.6.92 for rc1 release (diff) | |
| download | wayland-8094426a4168b78b924210e97ef178c78c1d296f.tar wayland-8094426a4168b78b924210e97ef178c78c1d296f.tar.gz wayland-8094426a4168b78b924210e97ef178c78c1d296f.tar.bz2 wayland-8094426a4168b78b924210e97ef178c78c1d296f.tar.lz wayland-8094426a4168b78b924210e97ef178c78c1d296f.tar.xz wayland-8094426a4168b78b924210e97ef178c78c1d296f.tar.zst wayland-8094426a4168b78b924210e97ef178c78c1d296f.zip | |
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: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'tests/test-runner.c')
| -rw-r--r-- | tests/test-runner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-runner.c b/tests/test-runner.c index 70fa0ae..0412e85 100644 --- a/tests/test-runner.c +++ b/tests/test-runner.c @@ -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)) { stderr_set_color(RED); fprintf(stderr, "waitid failed: %m\n"); stderr_reset_color(); |
