summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authorotto <>2023-05-09 19:07:37 +0000
committerotto <>2023-05-09 19:07:37 +0000
commit4172ef82dd12eeda3308828629cdfb83b39b96cf (patch)
tree6cb62b6b8f31d3b4b254ddad36708e3856d837ef /src/regress/lib
parentceba2a8eb77eceed7e4f2c5518b11b3405f75a3c (diff)
downloadopenbsd-4172ef82dd12eeda3308828629cdfb83b39b96cf.tar.gz
openbsd-4172ef82dd12eeda3308828629cdfb83b39b96cf.tar.bz2
openbsd-4172ef82dd12eeda3308828629cdfb83b39b96cf.zip
Make malloc tests that set flags more robust against the user also
having flags set.
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libc/malloc/malloc_errs/malloc_errs.c4
-rw-r--r--src/regress/lib/libc/malloc/malloc_general/Makefile30
2 files changed, 19 insertions, 15 deletions
diff --git a/src/regress/lib/libc/malloc/malloc_errs/malloc_errs.c b/src/regress/lib/libc/malloc/malloc_errs/malloc_errs.c
index e2ac6dd79a..e0efb6ebf3 100644
--- a/src/regress/lib/libc/malloc/malloc_errs/malloc_errs.c
+++ b/src/regress/lib/libc/malloc/malloc_errs/malloc_errs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: malloc_errs.c,v 1.1 2023/05/08 11:12:44 otto Exp $ */ 1/* $OpenBSD: malloc_errs.c,v 1.2 2023/05/09 19:07:37 otto Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Otto Moerbeek <otto@drijf.net> 3 * Copyright (c) 2023 Otto Moerbeek <otto@drijf.net>
4 * 4 *
@@ -264,7 +264,7 @@ int main(int argc, char *argv[])
264 pid = fork(); 264 pid = fork();
265 switch (pid) { 265 switch (pid) {
266 case 0: 266 case 0:
267 snprintf(options, sizeof(options), "cfjgu%s", tests[i].flags); 267 snprintf(options, sizeof(options), "us%s", tests[i].flags);
268 snprintf(num, sizeof(num), "%d", i); 268 snprintf(num, sizeof(num), "%d", i);
269 execl(argv[0], argv[0], num, options, NULL); 269 execl(argv[0], argv[0], num, options, NULL);
270 err(1, "exec"); 270 err(1, "exec");
diff --git a/src/regress/lib/libc/malloc/malloc_general/Makefile b/src/regress/lib/libc/malloc/malloc_general/Makefile
index b06609f6fa..367b33b9c5 100644
--- a/src/regress/lib/libc/malloc/malloc_general/Makefile
+++ b/src/regress/lib/libc/malloc/malloc_general/Makefile
@@ -1,39 +1,43 @@
1# $OpenBSD: Makefile,v 1.6 2022/03/30 05:22:31 anton Exp $ 1# $OpenBSD: Makefile,v 1.7 2023/05/09 19:07:37 otto Exp $
2 2
3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
4PROG= malloc_general 4PROG= malloc_general
5 5
6.include <bsd.regress.mk> 6.include <bsd.regress.mk>
7 7
8t1: malloc_general 8t1: malloc_general
9 MALLOC_OPTIONS=cfgju ${.OBJDIR}/malloc_general 9 MALLOC_OPTIONS=su ${.OBJDIR}/malloc_general
10 10
11t2: malloc_general 11t2: malloc_general
12 MALLOC_OPTIONS=cfgjuC ${.OBJDIR}/malloc_general 12 MALLOC_OPTIONS=suC ${.OBJDIR}/malloc_general
13 13
14t3: malloc_general 14t3: malloc_general
15 MALLOC_OPTIONS=cfgjuJ ${.OBJDIR}/malloc_general 15 MALLOC_OPTIONS=suJ ${.OBJDIR}/malloc_general
16 16
17t4: malloc_general 17t4: malloc_general
18 MALLOC_OPTIONS=cfgjuF ${.OBJDIR}/malloc_general 18 MALLOC_OPTIONS=suF ${.OBJDIR}/malloc_general
19 19
20t5: malloc_general 20t5: malloc_general
21 MALLOC_OPTIONS=cfgjuG ${.OBJDIR}/malloc_general 21 MALLOC_OPTIONS=suG ${.OBJDIR}/malloc_general
22 22
23t6: malloc_general 23t6: malloc_general
24 MALLOC_OPTIONS=cfgjuS ${.OBJDIR}/malloc_general 24 MALLOC_OPTIONS=suS ${.OBJDIR}/malloc_general
25 25
26t7: malloc_general 26t7: malloc_general
27 MALLOC_OPTIONS=cfgjuFGJ ${.OBJDIR}/malloc_general 27 MALLOC_OPTIONS=suFGJ ${.OBJDIR}/malloc_general
28 28
29t8: malloc_general 29t8: malloc_general
30 MALLOC_OPTIONS=cfgjuCJ ${.OBJDIR}/malloc_general 30 MALLOC_OPTIONS=suCJ ${.OBJDIR}/malloc_general
31 31
32t9: malloc_general 32t9: malloc_general
33 MALLOC_OPTIONS=cfgjuCJJ ${.OBJDIR}/malloc_general 33 MALLOC_OPTIONS=suCJJ ${.OBJDIR}/malloc_general
34 34
35t10: malloc_general 35t10: malloc_general
36 MALLOC_OPTIONS=cfgjuJS ${.OBJDIR}/malloc_general 36 MALLOC_OPTIONS=suJS ${.OBJDIR}/malloc_general
37 37
38t11: malloc_general 38t11: malloc_general
39 MALLOC_OPTIONS=cfgjuFGJJ ${.OBJDIR}/malloc_general 39 MALLOC_OPTIONS=suFGJJ ${.OBJDIR}/malloc_general
40
41t12: malloc_general
42 MALLOC_OPTIONS=suFCJJ ${.OBJDIR}/malloc_general
43