Author: asomers Date: Mon Mar 5 19:02:32 2018 New Revision: 330520 URL: https://svnweb.freebsd.org/changeset/base/330520
Log: MFC r320726, r320727 r320726: Expect :snprintf_float to segfault This issue started occurring within the past month or so. PR: 220502 Reported by: Jenkins (amd64-head job) r320727: :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 with: r320726 PR: 220502 Modified: stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Mar 5 18:37:05 2018 (r330519) +++ stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Mar 5 19:02:32 2018 (r330520) @@ -137,6 +137,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) @@ -150,10 +154,17 @@ ATF_TC_BODY(snprintf_float, tc) char buf[1000]; struct rlimit rl; +#ifdef __FreeBSD__ + 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); _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"