This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Fix interactive crashlog test
ClosedPublic

Authored by mib on Jul 12 2022, 3:56 PM.

Details

Summary

This patch should fix the interactive crashlog test by checking in the
binary as a yaml to regeneate the binary with the addresses and offsets
when running the test.

rdar://93655633

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.Jul 12 2022, 3:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2022, 3:56 PM
mib requested review of this revision.Jul 12 2022, 3:56 PM

Can we use obj2yaml / yaml2obj for the binary?

mib updated this revision to Diff 444125.Jul 12 2022, 5:53 PM
mib edited the summary of this revision. (Show Details)

Remove debug info and add yaml representation of binary

  • Do we need the source file for anything? I think it's fine to keep it around to regenerate the test, but please fix the extension. Nothing in lldb uses .cc.
  • I think if we check in the "binary", we should also update the other crashlogs tests to rely on it, and get rid of patch-crashlog.py.
  • Let's format the JSON so it's more readable and easier to write tests for it in the future.
mib updated this revision to Diff 448395.Jul 28 2022, 12:05 PM

Address @JDevlieghere feedback:

  • Rename test source file (cc -> cpp)
  • Reformat crash report

I'll get rid of patch-crashlog.py in a follow-up patch

mib updated this revision to Diff 449486.Aug 2 2022, 4:58 PM
This revision is now accepted and ready to land.Aug 2 2022, 6:53 PM
This revision was automatically updated to reflect the committed changes.
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.ips