Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:34 -0000
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r345879 - stable/12/contrib/netbsd-tests/lib/libc/regex
Message-ID:  <201904041724.x34HOvKA034290@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Apr  4 17:24:57 2019
New Revision: 345879
URL: https://svnweb.freebsd.org/changeset/base/345879

Log:
  MFC r345516: netbsd-tests: import memory bump for libc/regex/t_exhaust

Modified:
  stable/12/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
==============================================================================
--- stable/12/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c	Thu Apr  4 17:21:30 2019	(r345878)
+++ stable/12/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c	Thu Apr  4 17:24:57 2019	(r345879)
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $	*/
+/*	$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $");
+__RCSID("$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $");
 
 #include <sys/resource.h>
 #include <atf-c.h>
@@ -56,7 +56,7 @@ mkstr(const char *str, size_t len)
 {
 	size_t slen = strlen(str);
 	char *p = malloc(slen * len + 1);
-	ATF_REQUIRE(p != NULL);
+	ATF_REQUIRE_MSG(p != NULL, "slen=%zu, len=%zu", slen, len);
 	for (size_t i = 0; i < len; i++)
 		strcpy(&p[i * slen], str);
 	return p;
@@ -183,11 +183,12 @@ ATF_TC_HEAD(regcomp_too_big, tc)
 ATF_TC_BODY(regcomp_too_big, tc)
 {
 	regex_t re;
-	struct rlimit limit;
 	int e;
+	struct rlimit limit;
 
-	limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024;
+	limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024;
 	ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1);
+
 	for (size_t i = 0; i < __arraycount(tests); i++) {
 		char *d = (*tests[i].pattern)(REGEX_MAXSIZE);
 		e = regcomp(&re, d, tests[i].type);





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