This is an archive of the discontinued LLVM Phabricator instance.

[lldb][Test] Make TestFrameFormatNameWithArgs.test more compatible across platforms
ClosedPublic

Authored by Michael137 on Nov 2 2022, 10:21 AM.

Details

Summary

On Linux the std::function formatter behaved differently to that on Darwin so we skipped the test on Linux, which we would like to avoid.

This patch removes usage of std::function in the test but attempts
to retain the test-coverage. We mainly want function types appearing
in the template argument and function argument lists.

Also add a char const* overload to one of the test functions to
cover the "format function argument using ValueObject formatter" code-path.

Diff Detail

Event Timeline

Michael137 created this revision.Nov 2 2022, 10:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 10:21 AM
Michael137 requested review of this revision.Nov 2 2022, 10:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 10:21 AM

Thanks for pointing this out @labath
I think this should be enough to get it working on Linux (though unfortunately I don't have a Linux machine handy to test this on)

Michael137 edited the summary of this revision. (Show Details)Nov 2 2022, 10:23 AM

Test passes on AArch64 Ubuntu 20.04.4, where it failed prior to this change.

labath accepted this revision.Nov 3 2022, 3:11 AM

Thanks.

I haven't tried the patch myself, but I see no reason why it should behave for me (x86) any different than on aarch64.

This revision is now accepted and ready to land.Nov 3 2022, 3:11 AM

Thanks for confirming @DavidSpickett