From a397c95f8aea58533e72379d6e0de12683ecd0dc Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Sat, 2 Aug 2025 06:16:35 +0000 Subject: This commit was manufactured by cvs2git to create tag 'tb_20250802'. --- src/regress/lib/libc/malloc/malloc_errno/Makefile | 5 --- .../lib/libc/malloc/malloc_errno/malloc_errno.c | 49 ---------------------- 2 files changed, 54 deletions(-) delete mode 100644 src/regress/lib/libc/malloc/malloc_errno/Makefile delete mode 100644 src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c (limited to 'src/regress/lib/libc/malloc/malloc_errno') diff --git a/src/regress/lib/libc/malloc/malloc_errno/Makefile b/src/regress/lib/libc/malloc/malloc_errno/Makefile deleted file mode 100644 index 73ebe37491..0000000000 --- a/src/regress/lib/libc/malloc/malloc_errno/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 2003/07/15 10:06:31 otto Exp $ - -PROG= malloc_errno - -.include diff --git a/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c b/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c deleted file mode 100644 index 1759291f38..0000000000 --- a/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $OpenBSD: malloc_errno.c,v 1.5 2019/06/11 22:16:13 bluhm Exp $ */ -/* - * Public domain. 2003, Otto Moerbeek - */ -#include -#include -#include -#include - -/* On arm64 with 2G of memory this test hangs while junking. */ -char *malloc_options = "jj"; - -static void -testerrno(size_t sz) -{ - void *p; - - errno = -1; - p = malloc(sz); - - if (p == NULL && errno != ENOMEM) - errx(1, "fail: %lx %p %d", (unsigned long)sz, p, errno); - - /* if alloc succeeded, test if errno did not change */ - if (p != NULL && errno != -1) - errx(1, "fail: %lx %p %d", (unsigned long)sz, p, errno); - - free(p); -} - -/* - * Provide some (silly) arguments to malloc(), and check if ERRNO is set - * correctly. - */ -int -main(int argc, char *argv[]) -{ - size_t i; - - testerrno(1); - testerrno(100000); - testerrno(-1); - testerrno(-1000); - testerrno(-10000); - testerrno(-10000000); - for (i = 0; i < 0x10; i++) - testerrno(i * 0x10000000); - return 0; -} -- cgit v1.2.3-55-g6feb