[libc-commits] [libc] [libc] Properly clear out errno in tests that check its value. (PR #131650)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Mon Mar 17 15:49:54 PDT 2025


================
@@ -15,6 +15,7 @@
 using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
 
 TEST(LlvmLibcEpollCreate1Test, Basic) {
+  LIBC_NAMESPACE::libc_errno = 0;
----------------
michaelrj-google wrote:

That's a good point. In general I'd prefer to test what we're really going to use, so I'd say go to `LIBC_ERRNO_MODE_SYSTEM`.

https://github.com/llvm/llvm-project/pull/131650


More information about the libc-commits mailing list