Page MenuHomePhabricator

[sanitizer_common] Rewrite more Posix tests to use asserts

Authored by mgorny on Dec 29 2018, 8:35 AM.



Rewrite the tests for Posix functions that silently 'return 1'
or 'exit(1)' on error, to instead verbosely report the error using
assert. This is based on requests made in review of D56136.

Diff Detail


Event Timeline

mgorny created this revision.Dec 29 2018, 8:35 AM
Herald added subscribers: Restricted Project, llvm-commits, kubamracek. · View Herald TranscriptDec 29 2018, 8:35 AM
mgorny updated this revision to Diff 179693.Dec 29 2018, 8:41 AM
mgorny retitled this revision from [sanitizer_common] Rewrite fgets/fputs/puts tests to use asserts to [sanitizer_common] Rewrite more Posix tests to use asserts.
mgorny edited the summary of this revision. (Show Details)

Updated to cover functions which used exit(1) too.

krytarowski added inline comments.Dec 29 2018, 8:44 AM
21 ↗(On Diff #179693)

While there.. devname_r has a broken interceptor for !NetBSD. Wrong return type.

krytarowski accepted this revision.Dec 29 2018, 9:06 AM
This revision is now accepted and ready to land.Dec 29 2018, 9:06 AM
This revision was automatically updated to reflect the committed changes.