[libc-commits] [libc] [libc] Fix wrong errno number in tls_test. (PR #80312)

via libc-commits libc-commits at lists.llvm.org
Thu Feb 1 09:30:43 PST 2024


https://github.com/lntue created https://github.com/llvm/llvm-project/pull/80312

None

>From d13c704e6977aeb440ddf5cf35de635773b7b0f5 Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue.h at gmail.com>
Date: Thu, 1 Feb 2024 17:29:51 +0000
Subject: [PATCH] [libc] Fix wrong errno number in tls_test.

---
 libc/test/integration/startup/linux/tls_test.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/test/integration/startup/linux/tls_test.cpp b/libc/test/integration/startup/linux/tls_test.cpp
index cf2ff94931ba6..2a6385e195a49 100644
--- a/libc/test/integration/startup/linux/tls_test.cpp
+++ b/libc/test/integration/startup/linux/tls_test.cpp
@@ -32,7 +32,7 @@ TEST_MAIN(int argc, char **argv, char **envp) {
   void *addr = LIBC_NAMESPACE::mmap(nullptr, 0, PROT_READ,
                                     MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
   ASSERT_TRUE(addr == MAP_FAILED);
-  ASSERT_ERRNO_SUCCESS();
+  ASSERT_ERRNO_EQ(EINVAL);
 
   return 0;
 }



More information about the libc-commits mailing list