]> granicus.if.org Git - strace/commit
tests: robustify attach-p-cmd.test against race conditions
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 6 Dec 2016 00:32:06 +0000 (00:32 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 6 Dec 2016 09:08:36 +0000 (09:08 +0000)
commitf91c9fe814916c2865ea76fda3714f39760183cc
tree33a11d47646d308d571eedf788106e0874c1bf0c
parent45ed340016ede5239a12a03eddf82de57de2c740
tests: robustify attach-p-cmd.test against race conditions

Introduce a synchronization mechanism between attach-p-cmd-p
and attach-p-cmd-cmd processes.

* tests/attach-p-cmd-cmd.c: Include <errno.h> and <sys/stat.h>.
(main): Wait for the lock directory creation by attach-p-cmd-p.
* tests/attach-p-cmd-p.c: Include <errno.h> and <sys/stat.h>.
(main): Create a lock directory and wait for its removal
by attach-p-cmd-cmd.
* tests/attach-p-cmd.test: Assume that test programs work.
tests/attach-p-cmd-cmd.c
tests/attach-p-cmd-p.c
tests/attach-p-cmd.test