This is an archive of the discontinued LLVM Phabricator instance.

[scudo/standalone] Don't define test main function for Fuchsia
ClosedPublic

Authored by mcgrathr on Sep 16 2020, 6:14 PM.

Details

Summary

Fuchsia's unit test library provides the main function by default.

Diff Detail

Event Timeline

mcgrathr created this revision.Sep 16 2020, 6:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2020, 6:14 PM
Herald added subscribers: Restricted Project, mgorny. · View Herald Transcript
mcgrathr requested review of this revision.Sep 16 2020, 6:14 PM
cryptoad added inline comments.Sep 16 2020, 6:24 PM
compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp
33

If you won't use main on Fuchsia do you need the #if?

mcgrathr updated this revision to Diff 292598.Sep 17 2020, 1:03 PM

simplified

mcgrathr updated this revision to Diff 292599.Sep 17 2020, 1:05 PM
mcgrathr retitled this revision from [scudo/standalone] Separate main function out into its own file to [scudo/standalone] Don't define test main function for Fuchsia.
mcgrathr edited the summary of this revision. (Show Details)

update msg

mcgrathr added inline comments.Sep 17 2020, 1:06 PM
compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp
33

I was still using it for one case but not for another. But you made me realize that the zxtest library provides a main function too, so it's actually sufficient to just always omit main for Fuchsia. That simplifies this change a lot.

cryptoad accepted this revision.Sep 17 2020, 1:11 PM
This revision is now accepted and ready to land.Sep 17 2020, 1:11 PM
This revision was landed with ongoing or failed builds.Sep 17 2020, 5:43 PM
This revision was automatically updated to reflect the committed changes.