This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizer] Fix getpwnam test on ppc64le Fedora 21.
ClosedPublic

Authored by foad on Apr 23 2015, 2:30 PM.

Details

Summary

On ppc64le Fedora 21, getpwnam_r("no-such-user", ...) returns ENOENT
instead of 0. Tolerate this in the test case.

Diff Detail

Event Timeline

foad updated this revision to Diff 24334.Apr 23 2015, 2:30 PM
foad retitled this revision from to [Sanitizer] Fix getpwnam test on ppc64le Fedora 21..
foad updated this object.
foad edited the test plan for this revision. (Show Details)
foad added a reviewer: eugenis.
foad added a subscriber: Unknown Object (MLST).
eugenis edited edge metadata.Apr 23 2015, 2:54 PM

See this long discussion for the same problem on aarch64:
https://groups.google.com/d/msg/address-sanitizer/YzYRJEvVimw/qTbLWxGckXYJ

foad added a comment.Apr 23 2015, 3:05 PM

See this long discussion for the same problem on aarch64:
https://groups.google.com/d/msg/address-sanitizer/YzYRJEvVimw/qTbLWxGckXYJ

Right. I see the same thing: even without the sanitizer, getpwnam_r returns ENOENT. And there's a comment from you in that discussion saying "Please change the assert to allow ENOENT in addition to 0." :-)

eugenis accepted this revision.Apr 23 2015, 3:20 PM
eugenis edited edge metadata.

Right :)
LGTM

This revision is now accepted and ready to land.Apr 23 2015, 3:20 PM
foad closed this revision.Apr 23 2015, 3:23 PM