From 2e5c684b65aedf36422f17018b3515a9d5f616d7 Mon Sep 17 00:00:00 2001 From: otto <> Date: Tue, 4 Jun 2019 05:30:39 +0000 Subject: Move to env var, likelky the possibility to set malloc options from main is going away. --- src/regress/lib/libc/malloc/malloc_general/Makefile | 16 ++++++++-------- .../lib/libc/malloc/malloc_general/malloc_general.c | 11 ----------- 2 files changed, 8 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libc/malloc/malloc_general/Makefile b/src/regress/lib/libc/malloc/malloc_general/Makefile index a0ee823bbe..ddc3220854 100644 --- a/src/regress/lib/libc/malloc/malloc_general/Makefile +++ b/src/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 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/src/regress/lib/libc/malloc/malloc_general/malloc_general.c b/src/regress/lib/libc/malloc/malloc_general/malloc_general.c index 8abc5210ca..7dbaf5d8aa 100644 --- a/src/regress/lib/libc/malloc/malloc_general/malloc_general.c +++ b/src/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) { -- cgit v1.2.3-55-g6feb