[llvm] r254484 - [libFuzzer] add a test that is built with -fsanitize-coverage=trace-bb

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 18:49:37 PST 2015


Author: kcc
Date: Tue Dec  1 20:49:37 2015
New Revision: 254484

URL: http://llvm.org/viewvc/llvm-project?rev=254484&view=rev
Log:
[libFuzzer] add a test that is built with -fsanitize-coverage=trace-bb

Added:
    llvm/trunk/lib/Fuzzer/test/trace-bb/
    llvm/trunk/lib/Fuzzer/test/trace-bb/CMakeLists.txt
Modified:
    llvm/trunk/lib/Fuzzer/test/CMakeLists.txt

Modified: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/CMakeLists.txt?rev=254484&r1=254483&r2=254484&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt (original)
+++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt Tue Dec  1 20:49:37 2015
@@ -38,6 +38,9 @@ set(UninstrumentedTests
   UninstrumentedTest
   )
 
+set(TraceBBTests
+  SimpleTest
+  )
 
 set(TestBinaries)
 
@@ -99,6 +102,11 @@ foreach(Test ${UninstrumentedTests})
   set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}-Uninstrumented)
 endforeach()
 
+add_subdirectory(trace-bb)
+
+foreach(Test ${TraceBBTests})
+  set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}-TraceBB)
+endforeach()
 
 set_target_properties(${TestBinaries}
   PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}

Added: llvm/trunk/lib/Fuzzer/test/trace-bb/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/trace-bb/CMakeLists.txt?rev=254484&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/trace-bb/CMakeLists.txt (added)
+++ llvm/trunk/lib/Fuzzer/test/trace-bb/CMakeLists.txt Tue Dec  1 20:49:37 2015
@@ -0,0 +1,14 @@
+# These tests are not instrumented with coverage.
+
+set(CMAKE_CXX_FLAGS_RELEASE
+  "${LIBFUZZER_FLAGS_BASE} -fsanitize-coverage=edge,trace-bb")
+
+foreach(Test ${TraceBBTests})
+  add_executable(LLVMFuzzer-${Test}-TraceBB
+    ../${Test}.cpp
+    )
+  target_link_libraries(LLVMFuzzer-${Test}-TraceBB
+    LLVMFuzzer
+    )
+endforeach()
+




More information about the llvm-commits mailing list