This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [testsuite] TestReproducerAttach.py: Fix dependency on external symbol files
ClosedPublic

Authored by jankratochvil on May 8 2020, 1:43 PM.

Details

Summary

D55859 and D63339 prevented needless dependencies on system symbol files.
This testcase was checked-in afterwards and it brings back one such unwanted dependency.
Under some circumstances it may cause false FAILs and/or excessive resource usage to run the testcase.

clang-format does not support .py so I have formatted it as I found most compatible.

Also this is not a full testcase-style initialization, for example --no-lldbinit ignores env("NO_LLDBINIT") setting which lldbtest.py does implement:

# If we spawn an lldb process for test (via pexpect), do not load the
# init file unless told otherwise.
if os.environ.get("NO_LLDBINIT") != "NO":
    self.lldbOption += " --no-lldbinit"

But this is what lldbpexpect.py does - it also ignores env("NO_LLDBINIT"). Sure one could also fix lldbpexpect.py to unify the initialization more with lldbtest.py but I find that outside of the scope of this patch.

Diff Detail

Event Timeline

jankratochvil created this revision.May 8 2020, 1:43 PM

Thanks Jan, LGTM.

For now this appears to be the only test doing this, but if we end up having more of those we should probably abstract that away behind a helper that gives you an array with the executable and the setup commands.

JDevlieghere accepted this revision.May 8 2020, 3:14 PM
This revision is now accepted and ready to land.May 8 2020, 3:14 PM
This revision was automatically updated to reflect the committed changes.