From owner-svn-src-stable-10@freebsd.org Tue Dec 29 01:05:49 2015 Return-Path: Delivered-To: svn-src-stable-10@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 B498CA4B885; Tue, 29 Dec 2015 01:05:49 +0000 (UTC) (envelope-from ngie@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 6B8261733; Tue, 29 Dec 2015 01:05:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBT15mKx016397; Tue, 29 Dec 2015 01:05:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBT15mPk016395; Tue, 29 Dec 2015 01:05:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512290105.tBT15mPk016395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 29 Dec 2015 01:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r292852 - in stable/10/contrib/netbsd-tests/lib/libc: gen ssp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2015 01:05:49 -0000 Author: ngie Date: Tue Dec 29 01:05:48 2015 New Revision: 292852 URL: https://svnweb.freebsd.org/changeset/base/292852 Log: MFC r292578: Don't dump core files with lib/libc/ssp/ssp_test and lib/libc/gen/assert_test The default `sysctl kern.corefile` value is compatible with `kyua test` (FreeBSD will dump to the current directory). If it's set to an absolute path however, `kyua test` will not be able to clean up the corefiles after the fact The corefiles have little value when testing the behavior of feature behavior, so just disable corefile generation Obtained from: Isilon OneFS (^/onefs/head@r511419) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_assert.c stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_assert.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_assert.c Tue Dec 29 00:43:46 2015 (r292851) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_assert.c Tue Dec 29 01:05:48 2015 (r292852) @@ -40,6 +40,23 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/ #include #include +#ifdef __FreeBSD__ +#include +#include +#include + +static void +disable_corefile(void) +{ + struct rlimit limits; + + limits.rlim_cur = 0; + limits.rlim_max = 0; + + ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0); +} +#endif + static void handler(int); static void @@ -65,6 +82,9 @@ ATF_TC_BODY(assert_false, tc) if (pid == 0) { +#ifdef __FreeBSD__ + disable_corefile(); +#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); @@ -102,6 +122,9 @@ ATF_TC_BODY(assert_true, tc) if (pid == 0) { +#ifdef __FreeBSD__ + disable_corefile(); +#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Tue Dec 29 00:43:46 2015 (r292851) +++ stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Tue Dec 29 01:05:48 2015 (r292852) @@ -35,6 +35,7 @@ h_fail() { echo "Executing command [ $2$1 ]" # Begin FreeBSD + ulimit -c 0 if true; then eval $2 atf_check -s signal -o ignore -e ignore $1 else