Date: Thu, 6 Jul 2017 07:59:01 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> 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 Message-ID: <201707060759.v667x1OT076398@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707060759.v667x1OT076398>