[compiler-rt] [NFC][sanitizer] Accept ETIMEDOUT in getpwnam_r_invalid_user.cpp (PR #186538)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 17:08:31 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Vitaly Buka (vitalybuka)

<details>
<summary>Changes</summary>

On some systems, looking up an result in a timeout.

Error here is not a sign of compiler-rt issue.


---
Full diff: https://github.com/llvm/llvm-project/pull/186538.diff


1 Files Affected:

- (modified) compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp (+1-1) 


``````````diff
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
index 4c6cffee05e51..5b82440379dca 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
@@ -16,7 +16,7 @@ int main(void) {
   int res = getpwnam_r("no-such-user", &pwd, buf, sizeof(buf), &pwdres);
   fprintf(stderr, "Result: %d\n", res);
   fflush(stderr);
-  assert(res == 0 || res == ENOENT);
+  assert(res == 0 || res == ENOENT || res == ETIMEDOUT);
   assert(pwdres == 0);
   return 0;
 }

``````````

</details>


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


More information about the llvm-commits mailing list