nptl: Add more coverage in tst-cancel4
commit2918b0d0ecbf781400577d63aed7eaa4498dad91
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 14 Jun 2016 15:18:32 +0000 (14 12:18 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 5 Jul 2016 13:49:37 +0000 (5 10:49 -0300)
treed1921e8fa42044585bf7f7e0ca17f77c6129b8b6
parent87523e9c3605037cee54bbc6bd7a040a15979cc1
nptl: Add more coverage in tst-cancel4

This patch adds early cancel test for open syscall through a FIFO
(thus makign subsequent call to open block until the other end is
also opened).

It also cleanup the sigpause tests by using sigpause along with
SIGINT instead of __xpg_sigpause and SIGCANCEL.  Since the idea
is just to test the cancellation handling there is no need to expose
internal glibc implementation details to the test through pthreadP.h
inclusion.

Tested x86_64.

* nptl/tst-cancel4-common.c (do_test): Add temporary fifo creation.
* nptl/tst-cancel4-common.h (fifoname): New variable.
(fifofd): Likewise.
(cl_fifo): New function.
* nptl/tst-cancel4.c (tf_sigpause): Replace SIGCANCEL usage by
SIGINT.
(tf_open): Add early cancel test.
ChangeLog
nptl/tst-cancel4-common.c
nptl/tst-cancel4-common.h
nptl/tst-cancel4.c