[compiler-rt] r224529 - Fix suppressions file usage

Filipe Cabecinhas me at filcab.net
Thu Dec 18 10:25:19 PST 2014


Author: filcab
Date: Thu Dec 18 12:25:18 2014
New Revision: 224529

URL: http://llvm.org/viewvc/llvm-project?rev=224529&view=rev
Log:
Fix suppressions file usage

Summary:
Always quote suppressions files given to *_OPTIONS.
This will make it not break when given full Windows paths (otherwise,
parsing would stop after the drive's letter + ':').

Also fix one or two cases where the suppression files' extensions were
not *.supp.

Reviewers: samsonov, kcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6680

Modified:
    compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc
    compiler-rt/trunk/test/lsan/TestCases/suppressions_file.cc
    compiler-rt/trunk/test/tsan/free_race.c
    compiler-rt/trunk/test/tsan/ignore_lib0.cc
    compiler-rt/trunk/test/tsan/ignore_lib1.cc
    compiler-rt/trunk/test/tsan/ignore_lib2.cc
    compiler-rt/trunk/test/tsan/ignore_lib3.cc
    compiler-rt/trunk/test/tsan/mutex_cycle2.c
    compiler-rt/trunk/test/tsan/suppressions_global.cc
    compiler-rt/trunk/test/tsan/suppressions_race.cc
    compiler-rt/trunk/test/tsan/suppressions_race2.cc
    compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp

Modified: compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc Thu Dec 18 12:25:18 2014
@@ -4,17 +4,17 @@
 
 // Check that suppressing the interceptor by name works.
 // RUN: echo "interceptor_name:memmove" > %t.supp
-// RUN: ASAN_OPTIONS=suppressions=%t.supp %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: ASAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
 // Check that suppressing by interceptor name works even without the symbolizer
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:symbolize=false %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':symbolize=false" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
 // Check that suppressing all reports from a library works.
 // RUN: echo "interceptor_via_lib:CoreFoundation" > %t.supp
-// RUN: ASAN_OPTIONS=suppressions=%t.supp %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: ASAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
 // Check that suppressing library works even without the symbolizer.
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:symbolize=false %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':symbolize=false" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
 #include <CoreFoundation/CoreFoundation.h>
 

Modified: compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc Thu Dec 18 12:25:18 2014
@@ -3,8 +3,8 @@
 // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
 
 // RUN: echo "interceptor_via_fun:crash_function" > %t.supp
-// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=suppressions=%t.supp %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-// RUN: %clangxx_asan -O3 %s -o %t && ASAN_OPTIONS=suppressions=%t.supp %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: %clangxx_asan -O3 %s -o %t && ASAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
 // XFAIL: android
 

Modified: compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc Thu Dec 18 12:25:18 2014
@@ -3,7 +3,7 @@
 // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
 
 // RUN: echo "interceptor_name:strlen" > %t.supp
-// RUN: ASAN_OPTIONS=suppressions=%t.supp %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: ASAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
 // XFAIL: android
 

Modified: compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc Thu Dec 18 12:25:18 2014
@@ -5,7 +5,7 @@
 // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
 
 // RUN: echo "interceptor_via_lib:%t-so.so" > %t.supp
-// RUN: ASAN_OPTIONS=suppressions=%t.supp %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: ASAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
 // XFAIL: android
 

Modified: compiler-rt/trunk/test/lsan/TestCases/suppressions_file.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/suppressions_file.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/lsan/TestCases/suppressions_file.cc (original)
+++ compiler-rt/trunk/test/lsan/TestCases/suppressions_file.cc Thu Dec 18 12:25:18 2014
@@ -1,11 +1,11 @@
 // RUN: LSAN_BASE="use_registers=0:use_stacks=0"
 // RUN: %clangxx_lsan %s -o %t
 
-// RUN: echo "leak:*LSanTestLeakingFunc*" > %t.supp1
-// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions=%t.supp1 not %run %t 2>&1 | FileCheck %s
+// RUN: echo "leak:*LSanTestLeakingFunc*" > %t.supp
+// RUN: LSAN_OPTIONS="$LSAN_BASE:suppressions='%t.supp'" not %run %t 2>&1 | FileCheck %s
 
-// RUN: echo "leak:%t" > %t.supp2
-// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions="%t.supp2":symbolize=false %run %t
+// RUN: echo "leak:%t" > %t.supp
+// RUN: LSAN_OPTIONS="$LSAN_BASE:suppressions='%t.supp':symbolize=false" %run %t
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/tsan/free_race.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/free_race.c?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/free_race.c (original)
+++ compiler-rt/trunk/test/tsan/free_race.c Thu Dec 18 12:25:18 2014
@@ -1,6 +1,6 @@
 // RUN: %clang_tsan -O1 %s -o %t
 // RUN: %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOZUPP
-// RUN: TSAN_OPTIONS="suppressions=%s.supp print_suppressions=1" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUPP
+// RUN: TSAN_OPTIONS="suppressions='%s.supp' print_suppressions=1" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SUPP
 
 #include <pthread.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/tsan/ignore_lib0.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib0.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib0.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib0.cc Thu Dec 18 12:25:18 2014
@@ -3,7 +3,7 @@
 // RUN: echo running w/o suppressions:
 // RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
 // RUN: echo running with suppressions:
-// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
+// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
 
 // Tests that interceptors coming from a library specified in called_from_lib
 // suppression are ignored.

Modified: compiler-rt/trunk/test/tsan/ignore_lib1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib1.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib1.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib1.cc Thu Dec 18 12:25:18 2014
@@ -3,7 +3,7 @@
 // RUN: echo running w/o suppressions:
 // RUN: %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP
 // RUN: echo running with suppressions:
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
+// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-WITHSUPP
 
 // Tests that interceptors coming from a dynamically loaded library specified
 // in called_from_lib suppression are ignored.

Modified: compiler-rt/trunk/test/tsan/ignore_lib2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib2.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib2.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib2.cc Thu Dec 18 12:25:18 2014
@@ -1,7 +1,7 @@
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib2_0.so
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib2_1.so
 // RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %deflake %run %t | FileCheck %s
+// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %deflake %run %t | FileCheck %s
 
 // Tests that called_from_lib suppression matched against 2 libraries
 // causes program crash (this is not supported).

Modified: compiler-rt/trunk/test/tsan/ignore_lib3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/ignore_lib3.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/ignore_lib3.cc (original)
+++ compiler-rt/trunk/test/tsan/ignore_lib3.cc Thu Dec 18 12:25:18 2014
@@ -1,6 +1,6 @@
 // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib3.so
 // RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %deflake %run %t | FileCheck %s
+// RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %deflake %run %t | FileCheck %s
 
 // Tests that unloading of a library matched against called_from_lib suppression
 // causes program crash (this is not supported).

Modified: compiler-rt/trunk/test/tsan/mutex_cycle2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mutex_cycle2.c?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mutex_cycle2.c (original)
+++ compiler-rt/trunk/test/tsan/mutex_cycle2.c Thu Dec 18 12:25:18 2014
@@ -2,10 +2,10 @@
 // RUN:                                 not %run %t 2>&1 | FileCheck %s
 // RUN: TSAN_OPTIONS=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s
 // RUN: TSAN_OPTIONS=detect_deadlocks=0     %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
-// RUN: echo "deadlock:main" > %t.sup
-// RUN: TSAN_OPTIONS="suppressions=%t.sup" %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
-// RUN: echo "deadlock:zzzz" > %t.sup
-// RUN: TSAN_OPTIONS="suppressions=%t.sup" not %run %t 2>&1 | FileCheck %s
+// RUN: echo "deadlock:main" > %t.supp
+// RUN: TSAN_OPTIONS="suppressions='%t.supp'" %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN: echo "deadlock:zzzz" > %t.supp
+// RUN: TSAN_OPTIONS="suppressions='%t.supp'" not %run %t 2>&1 | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 

Modified: compiler-rt/trunk/test/tsan/suppressions_global.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppressions_global.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppressions_global.cc (original)
+++ compiler-rt/trunk/test/tsan/suppressions_global.cc Thu Dec 18 12:25:18 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 

Modified: compiler-rt/trunk/test/tsan/suppressions_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppressions_race.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppressions_race.cc (original)
+++ compiler-rt/trunk/test/tsan/suppressions_race.cc Thu Dec 18 12:25:18 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/tsan/suppressions_race2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/suppressions_race2.cc?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/suppressions_race2.cc (original)
+++ compiler-rt/trunk/test/tsan/suppressions_race2.cc Thu Dec 18 12:25:18 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions=%s.supp" %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%s.supp'" %run %t 2>&1 | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
 #include <unistd.h>

Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp?rev=224529&r1=224528&r2=224529&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp Thu Dec 18 12:25:18 2014
@@ -12,16 +12,16 @@
 // RUN: %run %t m0 2>&1 | FileCheck %s --check-prefix=CHECK-NULL-MEMBER --strict-whitespace
 
 // RUN: (echo "vptr_check:S"; echo "vptr_check:T"; echo "vptr_check:U") > %t.supp
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 %run %t mS 2>&1
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 %run %t fS 2>&1
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 %run %t cS 2>&1
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 %run %t mV 2>&1
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 %run %t fV 2>&1
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 %run %t cV 2>&1
-// RUN: ASAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.supp:halt_on_error=1 %run %t oU 2>&1
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" %run %t mS 2>&1
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" %run %t fS 2>&1
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" %run %t cS 2>&1
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" %run %t mV 2>&1
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" %run %t fV 2>&1
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" %run %t cV 2>&1
+// RUN: ASAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.supp':halt_on_error=1" %run %t oU 2>&1
 
 // RUN: echo "vptr_check:S" > %t.loc-supp
-// RUN: ASAN_OPTIONS=suppressions=%t.loc-supp:halt_on_error=1 UBSAN_OPTIONS=suppressions=%t.loc-supp:halt_on_error=1 not %run %t x- 2>&1 | FileCheck %s --check-prefix=CHECK-LOC-SUPPRESS
+// RUN: ASAN_OPTIONS="suppressions='%t.loc-supp':halt_on_error=1" UBSAN_OPTIONS="suppressions='%t.loc-supp':halt_on_error=1" not %run %t x- 2>&1 | FileCheck %s --check-prefix=CHECK-LOC-SUPPRESS
 
 // FIXME: This test produces linker errors on Darwin.
 // XFAIL: darwin





More information about the llvm-commits mailing list