From owner-svn-src-head@freebsd.org Thu Jul 6 07:59:02 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 3BEA0DA73B0; Thu, 6 Jul 2017 07:59:02 +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 094F01625; Thu, 6 Jul 2017 07:59:01 +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 v667x1sl076399; Thu, 6 Jul 2017 07:59:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v667x1OT076398; Thu, 6 Jul 2017 07:59:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060759.v667x1OT076398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 07:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320727 - head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Commit-Revision: 320727 X-SVN-Commit-Repository: base 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: Thu, 06 Jul 2017 07:59:02 -0000 Author: ngie Date: Thu Jul 6 07:59:00 2017 New Revision: 320727 URL: https://svnweb.freebsd.org/changeset/base/320727 Log: :snprintf_float: don't blindly set RLIMIT_DATA and RLIMIT_AS to 1 MB -- raise the limit to 32MB instead. Require user=root and memory=64MB+ first so one can be reasonably sure that the test will function appropriately. MFC after: 1 month MFC with: r320726 PR: 220502 Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Thu Jul 6 07:45:20 2017 (r320726) +++ head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Thu Jul 6 07:59:00 2017 (r320727) @@ -127,6 +127,10 @@ ATF_TC_HEAD(snprintf_float, tc) atf_tc_set_md_var(tc, "descr", "test that floating conversions don't" " leak memory"); +#ifdef __FreeBSD__ + atf_tc_set_md_var(tc, "require.memory", "64m"); + atf_tc_set_md_var(tc, "require.user", "root"); +#endif } ATF_TC_BODY(snprintf_float, tc) @@ -141,13 +145,16 @@ ATF_TC_BODY(snprintf_float, tc) struct rlimit rl; #ifdef __FreeBSD__ - atf_tc_expect_signal(SIGSEGV, "test segfaults; PR # 220502"); -#endif - + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#else rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#endif time(&now); srand(now);