Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2018 18:37:05 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330519 - stable/11/contrib/netbsd-tests/lib/libc/stdio
Message-ID:  <201803051837.w25Ib5aU025098@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Mon Mar  5 18:37:05 2018
New Revision: 330519
URL: https://svnweb.freebsd.org/changeset/base/330519

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/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c	Mon Mar  5 17:02:50 2018	(r330518)
+++ stable/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c	Mon Mar  5 18:37:05 2018	(r330519)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803051837.w25Ib5aU025098>