This is an archive of the discontinued LLVM Phabricator instance.

[TESTS] Fix TestInlineStepping with ccac compiler
AbandonedPublic

Authored by vasilyev on Mar 25 2021, 4:58 AM.

Details

Reviewers
jingham
Summary

The tests expect the debugger steps into the function, not the string constructor. But that depends on the compiler. Thus, with "ссaс" the tests are failing.

Diff Detail

Event Timeline

vasilyev requested review of this revision.Mar 25 2021, 4:58 AM
vasilyev created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2021, 4:58 AM
teemperor removed a project: Restricted Project.Mar 25 2021, 5:00 AM
teemperor edited reviewers, added: jingham; removed: Restricted Project.Mar 25 2021, 5:53 AM
teemperor added a subscriber: teemperor.

Thanks for the patch!

A few general notes:

  • You probably want to upload the diffs with more context (git diff -U9999 or something like that) to get rid of the "Context not available" in the source changes part. That's sadly how Phabricator works. If you use arcanist to upload patches then I believe it does that automatically for you.
  • Please don't add unrelated projects such as "LLDB test suite on simulator" (those are like tags that are used to group reviews that are all related to a specific task/goal). "LLDB" is the right project for general LLDB patches ("LLVM" for patches that target the general LLVM part in llvm/).

Regarding the patch itself: From what I understand what this test (maybe unintentionally) tests it that when we do step-in we apply the target.process.thread.step-avoid-regexp setting (which will skip all std::* functions when doing a step-in from what I know). So It's not clear how to me how LLDB ends up stepping into the std::string constructor (even if ccac is using a custom standard library). Can you post some more details about the test failure you're setting (e.g., where you end up with the source breakpoint and where the step-in actually takes you).

I think this is in any case something for Jim to review.

teemperor removed a project: Restricted Project.Mar 25 2021, 5:53 AM
jingham requested changes to this revision.EditedMar 25 2021, 10:45 AM

Raphael is right. The default values of the target.process.thread.step-avoid-regexp are set such that if lldb finds itself in a function inlined from std:: it will automatically step back out. This test is testing that (among other things). The fact that the test is failing means that something in how your compiler is generating symbols or debug info is defeating this. Maybe it's emitting the std:: symbols in such a way that the regexp isn't matching them? Maybe the inline records in the DWARF are confusing lldb somehow?

In any case, changing the test is not the right resolution, if you are stopping in a std::string constructor that is a real failure.

Our test runner allows you to x-fail a test based on compiler and compiler version. In fact this test is x-failed for icc because of some other optimizations that compiler does. So if you're trying to get a clean run it would be fine to file a bug about this failure, then add an expectedFailureAll(compiler="ccac", bugnumber="<BUG_NUMBER>") to the test, and come back and fix the behavior when you or somebody else working on this compiler gets around to it. Or of course, figure out why the behavior is incorrect with the ccac output, and fix that, if you have the time for that now.

This revision now requires changes to proceed.Mar 25 2021, 10:45 AM
vasilyev edited the summary of this revision. (Show Details)Mar 25 2021, 10:47 AM

So from what I understand this is resolved? If yes, can you abandon/close this revision (You can do this by selecting the "Abandon revision" action above the input field where you can comment).

vasilyev abandoned this revision.Mar 29 2021, 8:31 AM

Resolved