Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Eliminate race condition in CTU lit tests #480

Closed martong closed 6 years ago

martong commented 6 years ago

The usage of LLVM lit tests "%T" is dangerous because it may cause race conditions between the individual test cases.

https://llvm.org/docs/TestingGuide.html

%T Directory of %t. Deprecated. Shouldn’t be used, because it can be easily misused and cause race conditions between tests.

Use rm -rf %t && mkdir %t instead if a temporary directory is necessary.

Example: /home/user/llvm.build/test/MC/ELF/Output

balazske commented 6 years ago

It is possible to use %t directly, instead of %t/ctudir.

martong commented 5 years ago

https://reviews.llvm.org/D55129