Summary: Original patch by Kuba Mracek The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in compiler-rt. Differential Revision: https://reviews.llvm.org/D48618 llvm-svn: 336661
26 lines
535 B
C++
26 lines
535 B
C++
// RUN: rm -rf %t-dir
|
|
// RUN: mkdir %t-dir && cd %t-dir
|
|
// RUN: %clangxx_asan -fsanitize-coverage=func %s -o test.exe
|
|
// RUN: %env_asan_opts=coverage=1 %run ./test.exe
|
|
//
|
|
// RUN: %sancov print *.sancov | FileCheck %s
|
|
#include <stdio.h>
|
|
|
|
void foo() { fputs("FOO", stderr); }
|
|
void bar() { fputs("BAR", stderr); }
|
|
|
|
int main(int argc, char **argv) {
|
|
if (argc == 2) {
|
|
foo();
|
|
bar();
|
|
} else {
|
|
bar();
|
|
foo();
|
|
}
|
|
}
|
|
|
|
// CHECK: 0x{{[0-9a-f]*}}
|
|
// CHECK: 0x{{[0-9a-f]*}}
|
|
// CHECK: 0x{{[0-9a-f]*}}
|
|
// CHECK-NOT: 0x{{[0-9a-f]*}}
|