svn commit: r324668 - head/tests/sys/kern

Bryan Drewery bdrewery at FreeBSD.org
Mon Oct 16 20:06:25 UTC 2017


Author: bdrewery
Date: Mon Oct 16 20:06:24 2017
New Revision: 324668
URL: https://svnweb.freebsd.org/changeset/base/324668

Log:
  This child is expected to exit on SIGTRAP, don't leave a core behind.
  
  MFC after:	1 week
  Sponsored by:	Dell EMC Isilon

Modified:
  head/tests/sys/kern/ptrace_test.c

Modified: head/tests/sys/kern/ptrace_test.c
==============================================================================
--- head/tests/sys/kern/ptrace_test.c	Mon Oct 16 17:21:52 2017	(r324667)
+++ head/tests/sys/kern/ptrace_test.c	Mon Oct 16 20:06:24 2017	(r324668)
@@ -2467,12 +2467,16 @@ ATF_TC_WITHOUT_HEAD(ptrace__PT_CONTINUE_with_sigtrap_s
 ATF_TC_BODY(ptrace__PT_CONTINUE_with_sigtrap_system_call_entry, tc)
 {
 	struct ptrace_lwpinfo pl;
+	struct rlimit rl;
 	pid_t fpid, wpid;
 	int status;
 
 	ATF_REQUIRE((fpid = fork()) != -1);
 	if (fpid == 0) {
 		trace_me();
+		/* SIGTRAP expected to cause exit on syscall entry. */
+		rl.rlim_cur = rl.rlim_max = 0;
+		ATF_REQUIRE(setrlimit(RLIMIT_CORE, &rl) == 0);
 		getpid();
 		exit(1);
 	}


More information about the svn-src-head mailing list