[libc-commits] [libc] Disable prctl test when building for arm or riscv. (PR #143627)

Amy Huang via libc-commits libc-commits at lists.llvm.org
Tue Jun 10 16:13:12 PDT 2025


https://github.com/amykhuang updated https://github.com/llvm/llvm-project/pull/143627

>From 8c8f8546a4b2d6797c9fee3c5cbd9d1a9e8b19f5 Mon Sep 17 00:00:00 2001
From: Amy Huang <akhuang at google.com>
Date: Tue, 10 Jun 2025 15:43:59 -0700
Subject: [PATCH 1/2] Disable prctl test when building for arm or riscv

---
 libc/test/src/sys/prctl/linux/CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libc/test/src/sys/prctl/linux/CMakeLists.txt b/libc/test/src/sys/prctl/linux/CMakeLists.txt
index b06e1c8087008..d02900e1857a0 100644
--- a/libc/test/src/sys/prctl/linux/CMakeLists.txt
+++ b/libc/test/src/sys/prctl/linux/CMakeLists.txt
@@ -1,5 +1,10 @@
 add_custom_target(libc_sys_prctl_unittests)
 
+# Temporarily disable this test while setting up arm and riscv buildbots
+# using qemu, since PR_GET_THP_DISABLE is not supported on qemu.
+if (NOT (LIBC_TARGET_ARCHITECTURE_IS_ARM OR
+	 LIBC_TARGET_ARCHITECTURE_IS_RISCV32 OR
+	 LIBC_TARGET_ARCHITECTURE_IS_RISCV64))
 add_libc_unittest(
   prctl_test
   SUITE
@@ -13,3 +18,4 @@ add_libc_unittest(
     libc.test.UnitTest.ErrnoCheckingTest
     libc.test.UnitTest.ErrnoSetterMatcher
 )
+endif()

>From aedce4cc4e9f47a156062f9f84c9a7e6169b4bd0 Mon Sep 17 00:00:00 2001
From: Amy Huang <akhuang at google.com>
Date: Tue, 10 Jun 2025 16:12:33 -0700
Subject: [PATCH 2/2] Add comment to the prctl test file.

---
 libc/test/src/sys/prctl/linux/prctl_test.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libc/test/src/sys/prctl/linux/prctl_test.cpp b/libc/test/src/sys/prctl/linux/prctl_test.cpp
index 374c905e0ef8a..76b829c82d1be 100644
--- a/libc/test/src/sys/prctl/linux/prctl_test.cpp
+++ b/libc/test/src/sys/prctl/linux/prctl_test.cpp
@@ -34,6 +34,7 @@ TEST_F(LlvmLibcSysPrctlTest, GetSetName) {
 TEST_F(LlvmLibcSysPrctlTest, GetTHPDisable) {
   // Manually check errno since the return value logic here is not
   // covered in ErrnoSetterMatcher.
+  // Note that PR_GET_THP_DISABLE is not supported by QEMU.
   int ret = LIBC_NAMESPACE::prctl(PR_GET_THP_DISABLE, 0, 0, 0, 0);
   ASSERT_ERRNO_SUCCESS();
   // PR_GET_THP_DISABLE return (as the function result) the current



More information about the libc-commits mailing list