]> granicus.if.org Git - strace/commit
tests: robustify attach-f-p.test against race conditions
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 6 Dec 2016 01:54:13 +0000 (01:54 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 6 Dec 2016 09:09:18 +0000 (09:09 +0000)
commit997f49f19094a90442103719f7e73ebeab1a02d4
treee1fb8a94f9f137778d0bba02b69eb5d0b6c04dbe
parentf91c9fe814916c2865ea76fda3714f39760183cc
tests: robustify attach-f-p.test against race conditions

Introduce a synchronization mechanism between attach-f-p and strace.

* tests/attach-f-p-cmd.c: New file.
* tests/Makefile.am (check_PROGRAMS): Add attach-f-p-cmd.
* tests/attach-f-p.c: Include <sys/stat.h>.
(main): Write to stdout instead of descriptor 3.  Wait for the peer
writing to stdout.
* tests/attach-f-p.test: Assume that ./attach-f-p-cmd works.
Use $OUT for expected output.  Use attach-f-p-cmd for unlocking $OUT.
tests/Makefile.am
tests/attach-f-p-cmd.c [new file with mode: 0644]
tests/attach-f-p.c
tests/attach-f-p.test