Commit Graph

2 Commits

Author SHA1 Message Date
Adhemerval Zanella
2918b0d0ec 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.
2016-07-05 10:49:37 -03:00
Adhemerval Zanella
b39b6e0c90 nptl: Add sendmmsg and recvmmsg cancellation tests
This patch adds cancellation tests for both sendmmsg and recvmmsg
syscalls.  Since for some system configuration (x86_64/i686 on
older kernels and non-Linux platforms), the tests are added as
two independent that report as unsupported if the syscall is not
presented.

Both new tests uses the already tst-cancel4.c code, which as moved
to a common tst-cancel4-common{.c,h} files.

Tested on x86_64 and i686.

	* nptl/Makefile (test): Add tst-cancel4_1 and tst-cancel4_2.
	* nptl/tst-cancel4-common.c: New file.
	* nptl/tst-cancel4-common.h: Likewise.
	* nptl/tst-cancel4.c: Move common definitions to
	tst-cancel4-common.{c,h} file.
	* nptl/tst-cancel4_1.c: New test.
	* nptl/tst-cancel4_2.c: New test.
2016-06-13 13:37:24 -03:00