Date: Fri, 27 Apr 2018 16:34:28 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333067 - head/tests/sys/kern Message-ID: <201804271634.w3RGYSwO000718@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Apr 27 16:34:28 2018 New Revision: 333067 URL: https://svnweb.freebsd.org/changeset/base/333067 Log: 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 Modified: head/tests/sys/kern/pdeathsig.c Modified: head/tests/sys/kern/pdeathsig.c ============================================================================== --- head/tests/sys/kern/pdeathsig.c Fri Apr 27 15:50:22 2018 (r333066) +++ head/tests/sys/kern/pdeathsig.c Fri Apr 27 16:34:28 2018 (r333067) @@ -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); @@ -265,10 +262,6 @@ ATF_TC_BODY(signal_delivered_ptrace, tc) /* request a signal on parent death and register a handler */ 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804271634.w3RGYSwO000718>