diff options
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libc/malloc/malloc_general/Makefile | 16 | ||||
| -rw-r--r-- | src/regress/lib/libc/malloc/malloc_general/malloc_general.c | 11 |
2 files changed, 8 insertions, 19 deletions
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 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.3 2017/01/24 16:03:28 otto Exp $ | 1 | # $OpenBSD: Makefile,v 1.4 2019/06/04 05:30:39 otto Exp $ |
| 2 | 2 | ||
| 3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 | 3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 |
| 4 | PROG= malloc_general | 4 | PROG= malloc_general |
| @@ -6,22 +6,22 @@ PROG= malloc_general | |||
| 6 | .include <bsd.regress.mk> | 6 | .include <bsd.regress.mk> |
| 7 | 7 | ||
| 8 | t1: malloc_general | 8 | t1: malloc_general |
| 9 | ${.OBJDIR}/malloc_general "" | 9 | MALLOC_OPTIONS=cfgju ${.OBJDIR}/malloc_general |
| 10 | 10 | ||
| 11 | t2: malloc_general | 11 | t2: malloc_general |
| 12 | ${.OBJDIR}//malloc_general C | 12 | MALLOC_OPTIONS=cfgjuC ${.OBJDIR}//malloc_general |
| 13 | 13 | ||
| 14 | t3: malloc_general | 14 | t3: malloc_general |
| 15 | ${.OBJDIR}//malloc_general J | 15 | MALLOC_OPTIONS=cfgjuJ ${.OBJDIR}//malloc_general |
| 16 | 16 | ||
| 17 | t4: malloc_general | 17 | t4: malloc_general |
| 18 | ${.OBJDIR}//malloc_general F | 18 | MALLOC_OPTIONS=cfgjuF ${.OBJDIR}//malloc_general |
| 19 | 19 | ||
| 20 | t5: malloc_general | 20 | t5: malloc_general |
| 21 | ${.OBJDIR}//malloc_general G | 21 | MALLOC_OPTIONS=cfgjuG ${.OBJDIR}//malloc_general |
| 22 | 22 | ||
| 23 | t6: malloc_general | 23 | t6: malloc_general |
| 24 | ${.OBJDIR}//malloc_general S | 24 | MALLOC_OPTIONS=cfgjuS ${.OBJDIR}//malloc_general |
| 25 | 25 | ||
| 26 | t7: malloc_general | 26 | t7: malloc_general |
| 27 | ${.OBJDIR}//malloc_general FGJ | 27 | 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) | |||
| 33 | 33 | ||
| 34 | struct { void *p; size_t sz; } a[N]; | 34 | struct { void *p; size_t sz; } a[N]; |
| 35 | 35 | ||
| 36 | extern char *malloc_options; | ||
| 37 | |||
| 38 | void | 36 | void |
| 39 | fill(u_char *p, size_t sz) | 37 | fill(u_char *p, size_t sz) |
| 40 | { | 38 | { |
| @@ -60,15 +58,6 @@ main(int argc, char *argv[]) | |||
| 60 | int count, p, r, i; | 58 | int count, p, r, i; |
| 61 | void * q; | 59 | void * q; |
| 62 | size_t sz; | 60 | size_t sz; |
| 63 | char mo[20]; | ||
| 64 | |||
| 65 | if (argc == 1) | ||
| 66 | errx(1, "usage: malloc_options"); | ||
| 67 | |||
| 68 | /* first reset flags that might be set by env or sysctl */ | ||
| 69 | strlcpy(mo, "cfgju", sizeof(mo)); | ||
| 70 | strlcat(mo, argv[1], sizeof(mo)); | ||
| 71 | malloc_options = mo; | ||
| 72 | 61 | ||
| 73 | for (count = 0; count < 800000; count++) { | 62 | for (count = 0; count < 800000; count++) { |
| 74 | if (count % 10000 == 0) { | 63 | if (count % 10000 == 0) { |
