summaryrefslogtreecommitdiff
path: root/contrib/netbsd-tests
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2019-03-26 02:21:09 +0000
committerKyle Evans <kevans@FreeBSD.org>2019-03-26 02:21:09 +0000
commit79483833d06343afe6b87b59b1332e186d1339f8 (patch)
tree90128286ada1cab736ce25ec741ee098f0a0e5bb /contrib/netbsd-tests
parent4f207061133b096e7ad07bf75bd548ea7b46e9c3 (diff)
parentef169556a598aceba46e176f256a35cefae70ce7 (diff)
downloadsrc-test2-79483833d06343afe6b87b59b1332e186d1339f8.tar.gz
src-test2-79483833d06343afe6b87b59b1332e186d1339f8.zip
MFV r345515: netbsd-tests: import memory bump for libc/regex/t_exhaust
MFC after: 3 days
Notes
Notes: svn path=/head/; revision=345516
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r--contrib/netbsd-tests/lib/libc/regex/t_exhaust.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
index f9bd276f63d6..6f8f2f532147 100644
--- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
+++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
@@ -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);