This is an archive of the discontinued LLVM Phabricator instance.

[lldb][Test] TestRerunAndExpr.py: explicitly delete a.out before rebuilding it
ClosedPublic

Authored by Michael137 on Dec 8 2022, 9:14 AM.

Details

Summary

Summary

Older versions of make would occasionally fail to realize
that a pre-requisite for the a.out target has changed. This
resulted in roughly 1 out of 10 test runs to fail. Instead of
relying on make to resolve this dependency simply remove the
file before rebuilding; this will give make no option but to
remake a.out.

Testing

  • Confirmed that the test passes on the host for 100 runs where without the patch it would fail after ~10

Details

Adding -d to lldbtest's make invocation and running the
test without this patch sometimes yielded:

Removing child 0x600000308ff0 PID 19915 from chain.
    Successfully remade target file `rebuild.o'.
   Finished prerequisites of target file `a.out'.
   Prerequisite `rebuild.o' is newer than target `a.out'.
  No need to remake target `a.out'.

Diff Detail

Event Timeline

Michael137 created this revision.Dec 8 2022, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 9:14 AM
Michael137 requested review of this revision.Dec 8 2022, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 9:14 AM
Michael137 updated this revision to Diff 481324.Dec 8 2022, 9:15 AM
  • Reword comment
aprantl accepted this revision.Dec 8 2022, 9:16 AM
This revision is now accepted and ready to land.Dec 8 2022, 9:16 AM
This revision was landed with ongoing or failed builds.Dec 8 2022, 9:17 AM
This revision was automatically updated to reflect the committed changes.