Index: test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc =================================================================== --- test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc +++ test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc @@ -2,6 +2,7 @@ // RUN: %clangxx -O0 -g %s -o %t && %run %t #include +#include #include #include #include @@ -13,7 +14,7 @@ struct passwd *pwdres; char buf[10000]; int res = getpwnam_r("no-such-user", &pwd, buf, sizeof(buf), &pwdres); - assert(res == 0); + assert(res == 0 || res == ENOENT); assert(pwdres == 0); return 0; }