git: e8431fae655b - main - Revert "tests/libc: use an allowlist for sbrk in NetBSD-derived tests"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 10 Oct 2026 17:43:13 UTC
The branch main has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=e8431fae655be5f3c5b95e091e72960ff713431f
commit e8431fae655be5f3c5b95e091e72960ff713431f
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-10 17:43:00 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-10-10 17:43:00 +0000
Revert "tests/libc: use an allowlist for sbrk in NetBSD-derived tests"
Need to update the commit message.
This reverts commit 36b849b5c76406bb6d9341bfb1a7f16ae5c189c9.
---
contrib/netbsd-tests/lib/libc/gen/t_dir.c | 14 ++++----------
contrib/netbsd-tests/lib/libc/sys/t_mlock.c | 14 +++-----------
2 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/contrib/netbsd-tests/lib/libc/gen/t_dir.c b/contrib/netbsd-tests/lib/libc/gen/t_dir.c
index 49800bfb3f34..53d1fce26e2d 100644
--- a/contrib/netbsd-tests/lib/libc/gen/t_dir.c
+++ b/contrib/netbsd-tests/lib/libc/gen/t_dir.c
@@ -38,14 +38,7 @@
#include <string.h>
#include <unistd.h>
-/*
- * sbrk is obsolete, and libc only provides it on a subset of
- * architectures.
- */
-#if defined(__amd64__) || defined(__arm__) || defined(__i386__) || \
- defined(__powerpc__)
-#define HAVE_SBRK
-#endif
+
ATF_TC(seekdir_basic);
ATF_TC_HEAD(seekdir_basic, tc)
@@ -141,7 +134,8 @@ ATF_TC_BODY(seekdir_basic, tc)
free(wasname);
}
-#ifdef HAVE_SBRK
+/* There is no sbrk on AArch64 and RISC-V */
+#if !defined(__aarch64__) && !defined(__riscv)
ATF_TC(telldir_leak);
ATF_TC_HEAD(telldir_leak, tc)
{
@@ -191,7 +185,7 @@ ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC(tp, seekdir_basic);
-#ifdef HAVE_SBRK
+#if !defined(__aarch64__) && !defined(__riscv)
ATF_TP_ADD_TC(tp, telldir_leak);
#endif
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
index b081c60bbecc..d9ffbe366a04 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
@@ -46,15 +46,6 @@ __RCSID("$NetBSD: t_mlock.c,v 1.6 2016/08/09 12:02:44 kre Exp $");
#include <stdlib.h>
#include <unistd.h>
-/*
- * sbrk is obsolete, and libc only provides it on a subset of
- * architectures.
- */
-#if defined(__amd64__) || defined(__arm__) || defined(__i386__) || \
- defined(__powerpc__)
-#define HAVE_SBRK
-#endif
-
#ifdef __FreeBSD__
#include <limits.h>
#define _KMEMUSER
@@ -112,7 +103,7 @@ ATF_TC_BODY(mlock_err, tc)
unsigned long vmin = 0;
size_t len = sizeof(vmin);
#endif
-#ifdef HAVE_SBRK
+#if !defined(__aarch64__) && !defined(__riscv)
void *invalid_ptr;
#endif
void *buf;
@@ -168,7 +159,8 @@ ATF_TC_BODY(mlock_err, tc)
#endif
(void)free(buf);
-#ifdef HAVE_SBRK
+/* There is no sbrk on AArch64 and RISC-V */
+#if !defined(__aarch64__) && !defined(__riscv)
/*
* Try to create a pointer to an unmapped page - first after current
* brk will likely do.