Page MenuHomePhabricator

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

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

Details

Summary

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

Diff Detail

Event Timeline

mcgrathr created this revision.Wed, Sep 16, 6:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Sep 16, 6:14 PM
Herald added subscribers: Restricted Project, mgorny. · View Herald Transcript
mcgrathr requested review of this revision.Wed, Sep 16, 6:14 PM
cryptoad added inline comments.Wed, Sep 16, 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.Thu, Sep 17, 1:03 PM

simplified

mcgrathr updated this revision to Diff 292599.Thu, Sep 17, 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.Thu, Sep 17, 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.Thu, Sep 17, 1:11 PM
This revision is now accepted and ready to land.Thu, Sep 17, 1:11 PM
This revision was landed with ongoing or failed builds.Thu, Sep 17, 5:43 PM
This revision was automatically updated to reflect the committed changes.