4 // RUN: %clangxx_tsan -O1 -fno-builtin %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib0.so
5 // RUN: %clangxx_tsan -O1 %s -L%t-dir -lignore_lib0 %link_libcxx_tsan -o %t
6 // RUN: echo running w/o suppressions:
7 // RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
8 // RUN: echo running with suppressions:
9 // RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
10 // RUN: echo running with generic suppression of noninstrumented code:
11 // RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %env_tsan_opts=ignore_noninstrumented_modules=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
13 // Tests that interceptors coming from a library specified in called_from_lib
14 // suppression are ignored.
16 // Some aarch64 kernels do not support non executable write pages
17 // REQUIRES: stable-runtime
23 extern "C" void libfunc();
31 #include "ignore_lib_lib.h"
35 // CHECK-NOSUPP: WARNING: ThreadSanitizer: data race
38 // CHECK-WITHSUPP-NOT: WARNING: ThreadSanitizer: data race