diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2018-04-27 16:34:28 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2018-04-27 16:34:28 +0000 |
commit | 1187fc2dc6d86842b5330d89be8b1c7c66579901 (patch) | |
tree | 6d26eb8d4094f6356882baaa3d7cc56b1e9786d6 /tests | |
parent | d552176e4bfa2e7feba000e6e997cf4ce2fcac29 (diff) | |
download | src-1187fc2dc6d86842b5330d89be8b1c7c66579901.tar.gz src-1187fc2dc6d86842b5330d89be8b1c7c66579901.zip |
Remove redundant pipe from pdeathsig.c test.
A pipe was was left over from a development version of pdeathsig.c and
is not needed.
Process C waits for a signal that'll be generated when process B
exists. Process B waits for process D to send it a byte via pipe_db
before it exits. Process D sends the byte after it has started
ptrace()ing process C. The point of the test is to show that process C
receives the signal because process B exited, even though C has been
reparented to process D. The pipe pipe_cd isn't doing anything useful
(though in an earlier version of the patch it did). Clean that up by
removing the useless pipe.
Submitted by: Thomas Munro
MFC after: 6 days
Differential revision: https://reviews.freebsd.org/D15214
Notes
Notes:
svn path=/head/; revision=333067
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/kern/pdeathsig.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tests/sys/kern/pdeathsig.c b/tests/sys/kern/pdeathsig.c index a80dde5e4a9e..a69720dce0e2 100644 --- a/tests/sys/kern/pdeathsig.c +++ b/tests/sys/kern/pdeathsig.c @@ -229,7 +229,6 @@ ATF_TC_BODY(signal_delivered_ptrace, tc) int rc; int pipe_ca[2]; int pipe_db[2]; - int pipe_cd[2]; char buffer; int status; @@ -237,8 +236,6 @@ ATF_TC_BODY(signal_delivered_ptrace, tc) ATF_REQUIRE(rc == 0); rc = pipe(pipe_db); ATF_REQUIRE(rc == 0); - rc = pipe(pipe_cd); - ATF_REQUIRE(rc == 0); rc = fork(); ATF_REQUIRE(rc != -1); @@ -266,10 +263,6 @@ ATF_TC_BODY(signal_delivered_ptrace, tc) rc = procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum); assert(rc == 0); - /* tell D we are ready for it to attach */ - rc = write(pipe_cd[1], ".", 1); - assert(rc == 1); - /* wait for B to die and signal us... */ signum = 0xdeadbeef; rc = sigwait(&sigset, &signum); |