82a4538f31
When a thread is stopped in ptracestop(), the ptrace(2) user may request a signal be delivered upon resumption of the thread. Heretofore, those signals were discarded unless ptracestop()'s caller was issignal(). Fix this by modifying ptracestop() to queue up signals requested by the ptrace user that will be delivered when possible. Take special care when the signal is SIGKILL (usually generated from a PT_KILL request); no new stop events should be triggered after a PT_KILL. Add a number of tests for the new functionality. Several tests were authored by jhb. PR: 212607 Reviewed by: kib Approved by: kib (mentor) MFC after: 2 weeks Sponsored by: Dell EMC In collaboration with: jhb Differential Revision: https://reviews.freebsd.org/D9260
54 lines
1.4 KiB
Makefile
54 lines
1.4 KiB
Makefile
# $FreeBSD$
|
|
|
|
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel
|
|
.PATH: ${SRCTOP}/sys/kern
|
|
|
|
TESTSDIR= ${TESTSBASE}/sys/kern
|
|
|
|
ATF_TESTS_C+= kern_copyin
|
|
ATF_TESTS_C+= kern_descrip_test
|
|
ATF_TESTS_C+= ptrace_test
|
|
TEST_METADATA.ptrace_test+= timeout="15"
|
|
ATF_TESTS_C+= reaper
|
|
PLAIN_TESTS_C+= subr_unit_test
|
|
ATF_TESTS_C+= unix_seqpacket_test
|
|
ATF_TESTS_C+= unix_passfd_test
|
|
TEST_METADATA.unix_seqpacket_test+= timeout="15"
|
|
ATF_TESTS_C+= waitpid_nohang
|
|
|
|
ATF_TESTS_SH+= coredump_phnum_test
|
|
|
|
BINDIR= ${TESTSDIR}
|
|
PROGS+= coredump_phnum_helper
|
|
|
|
LIBADD.ptrace_test+= pthread
|
|
LIBADD.unix_seqpacket_test+= pthread
|
|
|
|
NETBSD_ATF_TESTS_C+= lockf_test
|
|
NETBSD_ATF_TESTS_C+= mqueue_test
|
|
|
|
CFLAGS.mqueue_test+= -I${SRCTOP}/tests
|
|
LIBADD.mqueue_test+= rt
|
|
|
|
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
|
ATF_TESTS_C+= libkern_crc32
|
|
CFLAGS.libkern_crc32+= -msse4 -DUSERSPACE_TESTING
|
|
LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c
|
|
.endif
|
|
|
|
# subr_unit.c contains functions whose prototypes lie in headers that cannot be
|
|
# included in userland. But as far as subr_unit_test goes, they're effectively
|
|
# static. So it's ok to disable -Wmissing-prototypes for this program.
|
|
CFLAGS.subr_unit.c+= -Wno-missing-prototypes
|
|
SRCS.subr_unit_test+= subr_unit.c
|
|
|
|
WARNS?= 3
|
|
|
|
TESTS_SUBDIRS+= acct
|
|
TESTS_SUBDIRS+= execve
|
|
TESTS_SUBDIRS+= pipe
|
|
|
|
.include <netbsd-tests.test.mk>
|
|
|
|
.include <bsd.test.mk>
|