[libc-commits] [libc] [libc] Fix incorrect dependencies in various tests (PR #210297)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Fri Jul 17 03:38:21 PDT 2026
https://github.com/kaladron created https://github.com/llvm/llvm-project/pull/210297
Resolved several issues causing tests to be skipped during CMake configuration due to missing or incorrect dependencies:
* RPC: Updated rpc_smoke_test to use the new shared RPC headers and corrected the dependency to libc.shared.rpc.
* epoll: Enabled epoll_pwait2 entrypoint for x86_64, aarch64, and riscv Linux. Removed TODO comments since kernel 5.10 is EOL at the end of December, making this safe to enable.
* arpa/inet: Updated inet_ntoa test dependency to libc.src.__support.common.
* wchar: Fixed typo in mbrlen_test dependency (mbsrlen -> mbrlen).
* time: Removed unnecessary LibcTest dependency from time_test_utils.
Closes #150665
Assisted-by: Automated tooling, human reviewed.
>From 68f48c22039c34b456fd54f2dcca935f7ac7c64f Mon Sep 17 00:00:00 2001
From: Jeff Bailey <jbailey at raspberryginger.com>
Date: Fri, 17 Jul 2026 11:24:15 +0100
Subject: [PATCH] [libc] Fix incorrect dependencies in various tests
Resolved several issues causing tests to be skipped during CMake
configuration due to missing or incorrect dependencies:
* RPC: Updated rpc_smoke_test to use the new shared RPC headers
and corrected the dependency to libc.shared.rpc.
* epoll: Enabled epoll_pwait2 entrypoint for x86_64, aarch64,
and riscv Linux. Removed TODO comments since kernel 5.10
is EOL at the end of December, making this safe to enable.
* arpa/inet: Updated inet_ntoa test dependency to
libc.src.__support.common.
* wchar: Fixed typo in mbrlen_test dependency (mbsrlen -> mbrlen).
* time: Removed unnecessary LibcTest dependency from time_test_utils.
Closes #150665
Assisted-by: Automated tooling, human reviewed.
---
libc/config/linux/aarch64/entrypoints.txt | 4 +---
libc/config/linux/riscv/entrypoints.txt | 4 +---
libc/config/linux/x86_64/entrypoints.txt | 4 +---
libc/shared/CMakeLists.txt | 10 ++++++++++
libc/test/src/__support/RPC/CMakeLists.txt | 2 +-
libc/test/src/__support/RPC/rpc_smoke_test.cpp | 8 ++++----
libc/test/src/arpa/inet/CMakeLists.txt | 2 +-
libc/test/src/time/CMakeLists.txt | 1 -
libc/test/src/wchar/CMakeLists.txt | 2 +-
9 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index f418ad2a1e685..55a33edf497be 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -262,9 +262,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.sys.epoll.epoll_ctl
libc.src.sys.epoll.epoll_pwait
libc.src.sys.epoll.epoll_wait
- # TODO: Need to check if pwait2 is available before providing.
- # https://github.com/llvm/llvm-project/issues/80060
- # libc.src.sys.epoll.epoll_pwait2
+ libc.src.sys.epoll.epoll_pwait2
# sys/ioctl.h entrypoints
libc.src.sys.ioctl.ioctl
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index fea7d03096a79..07674dd30de2f 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -285,9 +285,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.sys.epoll.epoll_ctl
libc.src.sys.epoll.epoll_pwait
libc.src.sys.epoll.epoll_wait
- # TODO: Need to check if pwait2 is available before providing.
- # https://github.com/llvm/llvm-project/issues/80060
- # libc.src.sys.epoll.epoll_pwait2
+ libc.src.sys.epoll.epoll_pwait2
# sys/ioctl.h entrypoints
libc.src.sys.ioctl.ioctl
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index fa6fd16f3842d..9c501312bad8a 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -285,9 +285,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.sys.epoll.epoll_ctl
libc.src.sys.epoll.epoll_pwait
libc.src.sys.epoll.epoll_wait
- # TODO: Need to check if pwait2 is available before providing.
- # https://github.com/llvm/llvm-project/issues/80060
- # libc.src.sys.epoll.epoll_pwait2
+ libc.src.sys.epoll.epoll_pwait2
# sys/ioctl.h entrypoints
libc.src.sys.ioctl.ioctl
diff --git a/libc/shared/CMakeLists.txt b/libc/shared/CMakeLists.txt
index d27484909f652..4d7f627acc413 100644
--- a/libc/shared/CMakeLists.txt
+++ b/libc/shared/CMakeLists.txt
@@ -14,3 +14,13 @@ if(LIBC_TARGET_OS_IS_GPU)
COMPONENT libc-headers)
endforeach()
endif()
+
+add_header_library(
+ rpc
+ HDRS
+ rpc.h
+ rpc_util.h
+ rpc_dispatch.h
+ rpc_server.h
+ rpc_opcodes.h
+)
diff --git a/libc/test/src/__support/RPC/CMakeLists.txt b/libc/test/src/__support/RPC/CMakeLists.txt
index 8f79a49cec40c..ce4ce92581054 100644
--- a/libc/test/src/__support/RPC/CMakeLists.txt
+++ b/libc/test/src/__support/RPC/CMakeLists.txt
@@ -7,5 +7,5 @@ add_libc_test(
SRCS
rpc_smoke_test.cpp
DEPENDS
- libc.src.__support.RPC.rpc
+ libc.shared.rpc
)
diff --git a/libc/test/src/__support/RPC/rpc_smoke_test.cpp b/libc/test/src/__support/RPC/rpc_smoke_test.cpp
index 58b318c7cfa61..5a80c349c5893 100644
--- a/libc/test/src/__support/RPC/rpc_smoke_test.cpp
+++ b/libc/test/src/__support/RPC/rpc_smoke_test.cpp
@@ -6,15 +6,15 @@
//
//===----------------------------------------------------------------------===//
-#include "src/__support/RPC/rpc.h"
+#include "shared/rpc.h"
#include "test/UnitTest/Test.h"
namespace {
enum { lane_size = 8, port_count = 4 };
-using ProcAType = LIBC_NAMESPACE::rpc::Process<false>;
-using ProcBType = LIBC_NAMESPACE::rpc::Process<true>;
+using ProcAType = rpc::Process<false>;
+using ProcBType = rpc::Process<true>;
static_assert(ProcAType::inbox_offset(port_count) ==
ProcBType::outbox_offset(port_count));
@@ -54,7 +54,7 @@ TEST(LlvmLibcRPCSmoke, SanityCheck) {
// ProcA write to outbox
uint32_t ProcAOutbox = ProcA.load_outbox(lane_mask, index);
EXPECT_EQ(ProcAOutbox, 0u);
- ProcAOutbox = ProcA.invert_outbox(index, ProcAOutbox);
+ ProcAOutbox = ProcA.invert_outbox(lane_mask, index, ProcAOutbox);
EXPECT_EQ(ProcAOutbox, 1u);
// No longer available for ProcA
diff --git a/libc/test/src/arpa/inet/CMakeLists.txt b/libc/test/src/arpa/inet/CMakeLists.txt
index d6d92eacddabb..cdbd9232bb5a4 100644
--- a/libc/test/src/arpa/inet/CMakeLists.txt
+++ b/libc/test/src/arpa/inet/CMakeLists.txt
@@ -53,7 +53,7 @@ add_libc_unittest(
DEPENDS
libc.src.arpa.inet.inet_ntoa
libc.hdr.types.struct_in_addr
- libc.src.__support.endian_internal
+ libc.src.__support.common
)
add_libc_unittest(
diff --git a/libc/test/src/time/CMakeLists.txt b/libc/test/src/time/CMakeLists.txt
index eb633a814333e..85cd00f0300b9 100644
--- a/libc/test/src/time/CMakeLists.txt
+++ b/libc/test/src/time/CMakeLists.txt
@@ -9,7 +9,6 @@ add_header_library(
libc.hdr.types.struct_tm
libc.src.__support.macros.config
libc.src.time.time_constants
- LibcTest
)
add_libc_unittest(
diff --git a/libc/test/src/wchar/CMakeLists.txt b/libc/test/src/wchar/CMakeLists.txt
index 52406fdcfd2d6..82e8b0b7ade13 100644
--- a/libc/test/src/wchar/CMakeLists.txt
+++ b/libc/test/src/wchar/CMakeLists.txt
@@ -89,7 +89,7 @@ add_libc_test(
libc.hdr.errno_macros
libc.src.__support.wchar.mbstate
libc.src.string.memset
- libc.src.wchar.mbsrlen
+ libc.src.wchar.mbrlen
libc.hdr.types.mbstate_t
libc.hdr.types.wchar_t
libc.test.UnitTest.ErrnoCheckingTest
More information about the libc-commits
mailing list