summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2021-09-01 09:26:33 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2021-09-01 09:26:33 +0000
commit0451663c31b348e541cd40ad80e7f20d7a6b489f (patch)
tree2408b9fb82a20e429a97c891bfb8bd5a59f8147d /regress/lib
parentba579f96a41859711e682c128751b649936b5ca6 (diff)
remove manual fiddling with MALLOC_OPTIONS from libc regress tests
these options should be set globally (sysctl) when running regress as opposed to having individual tests set it, barring a few specific exceptions. ok bluhm@
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libc/env/envtest.c5
-rw-r--r--regress/lib/libc/strchr/strchrtest.c5
-rw-r--r--regress/lib/libc/strlcat/strlcattest.c5
-rw-r--r--regress/lib/libc/strlcpy/strlcpytest.c5
-rw-r--r--regress/lib/libc/strnlen/strnlentest.c5
5 files changed, 5 insertions, 20 deletions
diff --git a/regress/lib/libc/env/envtest.c b/regress/lib/libc/env/envtest.c
index f145ecbd140..79a5c0655f9 100644
--- a/regress/lib/libc/env/envtest.c
+++ b/regress/lib/libc/env/envtest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: envtest.c,v 1.2 2019/01/25 00:19:26 millert Exp $ */
+/* $OpenBSD: envtest.c,v 1.3 2021/09/01 09:26:32 jasper Exp $ */
/*
* Copyright (c) 2010 Todd C. Miller <millert@openbsd.org>
@@ -63,9 +63,6 @@ main(int argc, char *argv[])
int n, failures = 0;
size_t len, bufsize;
- /* Enable malloc security options. */
- setenv("MALLOC_OPTIONS", "S", 0);
-
fake_env();
n = count_instances("USER");
if (n != 2) {
diff --git a/regress/lib/libc/strchr/strchrtest.c b/regress/lib/libc/strchr/strchrtest.c
index 64d61203059..0be4c8df63f 100644
--- a/regress/lib/libc/strchr/strchrtest.c
+++ b/regress/lib/libc/strchr/strchrtest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strchrtest.c,v 1.1 2021/07/24 05:45:49 visa Exp $ */
+/* $OpenBSD: strchrtest.c,v 1.2 2021/09/01 09:26:32 jasper Exp $ */
/*
* Copyright (c) 2021 Visa Hankala
@@ -28,9 +28,6 @@ main(void)
char *buf;
size_t bufsize;
- /* Enable malloc security options. */
- setenv("MALLOC_OPTIONS", "S", 0);
-
/* Allocate buffer with guard pages. */
bufsize = getpagesize();
buf = malloc(bufsize);
diff --git a/regress/lib/libc/strlcat/strlcattest.c b/regress/lib/libc/strlcat/strlcattest.c
index 86896ff9873..00a9212eb5e 100644
--- a/regress/lib/libc/strlcat/strlcattest.c
+++ b/regress/lib/libc/strlcat/strlcattest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strlcattest.c,v 1.3 2019/01/25 00:19:26 millert Exp $ */
+/* $OpenBSD: strlcattest.c,v 1.4 2021/09/01 09:26:32 jasper Exp $ */
/*
* Copyright (c) 2014 Todd C. Miller <millert@openbsd.org>
@@ -43,9 +43,6 @@ main(int argc, char *argv[])
size_t len, bufsize;
int failures = 0;
- /* Enable malloc security options. */
- setenv("MALLOC_OPTIONS", "S", 0);
-
bufsize = getpagesize(); /* trigger guard pages easily */
buf = malloc(bufsize);
if (buf == NULL) {
diff --git a/regress/lib/libc/strlcpy/strlcpytest.c b/regress/lib/libc/strlcpy/strlcpytest.c
index e2151aea747..8f1d12dbce6 100644
--- a/regress/lib/libc/strlcpy/strlcpytest.c
+++ b/regress/lib/libc/strlcpy/strlcpytest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strlcpytest.c,v 1.3 2019/01/25 00:19:26 millert Exp $ */
+/* $OpenBSD: strlcpytest.c,v 1.4 2021/09/01 09:26:32 jasper Exp $ */
/*
* Copyright (c) 2014 Todd C. Miller <millert@openbsd.org>
@@ -43,9 +43,6 @@ main(int argc, char *argv[])
size_t len, bufsize;
int failures = 0;
- /* Enable malloc security options. */
- setenv("MALLOC_OPTIONS", "S", 0);
-
bufsize = getpagesize(); /* trigger guard pages easily */
buf = malloc(bufsize);
buf2 = malloc(bufsize);
diff --git a/regress/lib/libc/strnlen/strnlentest.c b/regress/lib/libc/strnlen/strnlentest.c
index 045b258bf10..78f8cfb2523 100644
--- a/regress/lib/libc/strnlen/strnlentest.c
+++ b/regress/lib/libc/strnlen/strnlentest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strnlentest.c,v 1.2 2019/01/25 00:19:26 millert Exp $ */
+/* $OpenBSD: strnlentest.c,v 1.3 2021/09/01 09:26:32 jasper Exp $ */
/*
* Copyright (c) 2010 Todd C. Miller <millert@openbsd.org>
@@ -29,9 +29,6 @@ int main(int argc, char *argv[])
int failures = 0;
size_t len, bufsize;
- /* Enable malloc security options. */
- setenv("MALLOC_OPTIONS", "S", 0);
-
bufsize = getpagesize(); /* trigger guard pages easily */
buf = malloc(bufsize);
if (buf == NULL) {