summaryrefslogtreecommitdiffstats
path: root/regress/lib/libc/malloc/malloc_general
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2019-06-04 05:30:39 +0000
committerotto <otto@openbsd.org>2019-06-04 05:30:39 +0000
commit47ebaa3eeca22f2628945bf28e386658126fb0b6 (patch)
treef0b2021b03dd6ee4bde15269a3498b4c8136d872 /regress/lib/libc/malloc/malloc_general
parenttx and rx descriptors work fine with 64bit dva (diff)
downloadwireguard-openbsd-47ebaa3eeca22f2628945bf28e386658126fb0b6.tar.xz
wireguard-openbsd-47ebaa3eeca22f2628945bf28e386658126fb0b6.zip
Move to env var, likelky the possibility to set malloc options from
main is going away.
Diffstat (limited to 'regress/lib/libc/malloc/malloc_general')
-rw-r--r--regress/lib/libc/malloc/malloc_general/Makefile16
-rw-r--r--regress/lib/libc/malloc/malloc_general/malloc_general.c11
2 files changed, 8 insertions, 19 deletions
diff --git a/regress/lib/libc/malloc/malloc_general/Makefile b/regress/lib/libc/malloc/malloc_general/Makefile
index a0ee823bbe8..ddc3220854e 100644
--- a/regress/lib/libc/malloc/malloc_general/Makefile
+++ b/regress/lib/libc/malloc/malloc_general/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2017/01/24 16:03:28 otto Exp $
+# $OpenBSD: Makefile,v 1.4 2019/06/04 05:30:39 otto Exp $
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7
PROG= malloc_general
@@ -6,22 +6,22 @@ PROG= malloc_general
.include <bsd.regress.mk>
t1: malloc_general
- ${.OBJDIR}/malloc_general ""
+ MALLOC_OPTIONS=cfgju ${.OBJDIR}/malloc_general
t2: malloc_general
- ${.OBJDIR}//malloc_general C
+ MALLOC_OPTIONS=cfgjuC ${.OBJDIR}//malloc_general
t3: malloc_general
- ${.OBJDIR}//malloc_general J
+ MALLOC_OPTIONS=cfgjuJ ${.OBJDIR}//malloc_general
t4: malloc_general
- ${.OBJDIR}//malloc_general F
+ MALLOC_OPTIONS=cfgjuF ${.OBJDIR}//malloc_general
t5: malloc_general
- ${.OBJDIR}//malloc_general G
+ MALLOC_OPTIONS=cfgjuG ${.OBJDIR}//malloc_general
t6: malloc_general
- ${.OBJDIR}//malloc_general S
+ MALLOC_OPTIONS=cfgjuS ${.OBJDIR}//malloc_general
t7: malloc_general
- ${.OBJDIR}//malloc_general FGJ
+ MALLOC_OPTIONS=cfgjuFGJ ${.OBJDIR}//malloc_general
diff --git a/regress/lib/libc/malloc/malloc_general/malloc_general.c b/regress/lib/libc/malloc/malloc_general/malloc_general.c
index 8abc5210ca7..7dbaf5d8aa5 100644
--- a/regress/lib/libc/malloc/malloc_general/malloc_general.c
+++ b/regress/lib/libc/malloc/malloc_general/malloc_general.c
@@ -33,8 +33,6 @@ size(void)
struct { void *p; size_t sz; } a[N];
-extern char *malloc_options;
-
void
fill(u_char *p, size_t sz)
{
@@ -60,15 +58,6 @@ main(int argc, char *argv[])
int count, p, r, i;
void * q;
size_t sz;
- char mo[20];
-
- if (argc == 1)
- errx(1, "usage: malloc_options");
-
- /* first reset flags that might be set by env or sysctl */
- strlcpy(mo, "cfgju", sizeof(mo));
- strlcat(mo, argv[1], sizeof(mo));
- malloc_options = mo;
for (count = 0; count < 800000; count++) {
if (count % 10000 == 0) {