Page MenuHomePhabricator

[CTU] Eliminate race condition in CTU lit tests
ClosedPublic

Authored by martong on Nov 30 2018, 8:19 AM.

Details

Summary

We plan to introduce additional CTU related lit test. Since lit may run the
tests in parallel, it is not safe to use the same directory (%T) for these
tests. It is safe to use however test case specific directories (%t).

Diff Detail

Repository
rL LLVM

Event Timeline

martong created this revision.Nov 30 2018, 8:19 AM

Hi Gabor,
Yes, the %T variable is obsolete, but it looks like the Guide recommendations are not entirely fulfilled.

test/Analysis/ctu-main.cpp
1 ↗(On Diff #176131)

The Testing Infrastructure Guide recommends to use rm -rf %t && mkdir %t.

xazax.hun accepted this revision.Dec 4 2018, 5:52 AM

After the review comment is resolved, the rest LGTM!

This revision is now accepted and ready to land.Dec 4 2018, 5:52 AM
martong updated this revision to Diff 176660.Dec 4 2018, 9:54 AM
  • Use rm, mkdir and break long RUN lines
a_sidorin accepted this revision.Dec 6 2018, 1:28 PM
This revision was automatically updated to reflect the committed changes.