From owner-svn-src-head@freebsd.org Mon May 22 20:34:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB4CED79E8F; Mon, 22 May 2017 20:34:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C85CA19C0; Mon, 22 May 2017 20:34:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MKYpmn097921; Mon, 22 May 2017 20:34:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MKYpGO097918; Mon, 22 May 2017 20:34:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705222034.v4MKYpGO097918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 22 May 2017 20:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318680 - in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/proc usr.sbin/dtrace/tests/common/proc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 20:34:53 -0000 Author: markj Date: Mon May 22 20:34:51 2017 New Revision: 318680 URL: https://svnweb.freebsd.org/changeset/base/318680 Log: Add a little helper program for tst.exitcore.ksh. sleep(1) is capsicumized, which means that we cannot rely on it to dump core as required by the test. MFC after: 1 week Sponsored by: Dell EMC Isilon Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c (contents, props changed) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c Mon May 22 20:34:51 2017 (r318680) @@ -0,0 +1,36 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2017 Mark Johnston + */ + +#include + +int +main(int argc, char **argv) +{ + + for (;;) + sleep(1); + + return (0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh Mon May 22 20:27:29 2017 (r318679) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh Mon May 22 20:34:51 2017 (r318680) @@ -52,7 +52,7 @@ script() /curpsinfo->pr_ppid == $child && execargs == "$longsleep" && args[0] != CLD_DUMPED/ { - printf("Child process could did dump core."); + printf("Child process could not dump core."); exit(1); } EOF @@ -62,10 +62,9 @@ sleeper() { while true; do $longsleep & - /bin/sleep 1 + /bin/sleep 1 kill -SEGV $! done - /bin/rm -f $corefile } if [ $# != 1 ]; then @@ -74,8 +73,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -longsleep="/bin/sleep 10000" -corefile=/tmp/sleep.core +longsleep="./tst.exitcore.exe" sleeper & child=$! @@ -83,10 +81,6 @@ child=$! script status=$? -#pstop $child -#pkill -P $child kill $child -#prun $child -/bin/rm -f $corefile exit $status Modified: head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Mon May 22 20:27:29 2017 (r318679) +++ head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Mon May 22 20:34:51 2017 (r318680) @@ -23,6 +23,7 @@ TESTEXES= \ CFILES= \ + tst.exitcore.c \ tst.sigwait.c \