1 // Test ignorelist functionality for TSan.
3 // RUN: echo "fun:*Ignorelisted_Thread2*" > %t.ignorelist
4 // RUN: %clangxx_tsan -O1 %s -fsanitize-ignorelist=%t.ignorelist -o %t && %run %t 2>&1 | FileCheck %s
10 void *Thread1(void *x
) {
15 void *Ignorelisted_Thread2(void *x
) {
22 pthread_create(&t
[0], NULL
, Thread1
, NULL
);
23 pthread_create(&t
[1], NULL
, Ignorelisted_Thread2
, NULL
);
24 pthread_join(t
[0], NULL
);
25 pthread_join(t
[1], NULL
);
26 fprintf(stderr
, "PASS\n");
30 // CHECK-NOT: ThreadSanitizer: data race