From 5a87cba9294c4d5ddb4a800f21e6e96fcc83cefa Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 13 Mar 2026 17:33:28 -0700 Subject: [PATCH] [NFC][sanitizer] Accept ETIMEDOUT in getpwnam_r_invalid_user.cpp (#186538) On some systems, looking up an result in a timeout. Error here is not a sign of compiler-rt issue. Fixes flakiness on https://lab.llvm.org/buildbot/#/builders/sanitizer-ppc64le-linux --- .../TestCases/Linux/getpwnam_r_invalid_user.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 4c6cffee05e5..fc162d0ef717 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,8 @@ 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); + // It can fail inconsistently on some bots with these errors. + assert(res == 0 || res == ENOENT || res == ETIMEDOUT); assert(pwdres == 0); return 0; }