From f9d8f38c58f826605cb13be98bbf0e39e1945329 Mon Sep 17 00:00:00 2001 From: "Dementiev, Roman" Date: Tue, 19 Nov 2024 10:31:48 +0100 Subject: [PATCH] asan already enabled in fuzzing; use PCM_FUZZ Change-Id: I344c0860706e10d404d844da344aac89589850a6 --- CMakeLists.txt | 5 ++++- tests/CMakeLists.txt | 4 ++-- tests/fuzz.sh | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 776e3b4d..662e5bff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright (c) 2022, Intel Corporation +# Copyright (c) 2022-2024, Intel Corporation cmake_minimum_required(VERSION 3.5) @@ -145,6 +145,9 @@ if(PCM_FUZZ) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FUZZER_OPTIONS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FUZZER_OPTIONS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FUZZER_OPTIONS}") + message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") + message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") + message(STATUS "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") endif(PCM_FUZZ) ####################### diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c7a507de..2ff9606c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright (c) 2022, Intel Corporation +# Copyright (c) 2022-2024, Intel Corporation set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/tests) @@ -18,7 +18,7 @@ if(UNIX) endif(UNIX) -if(FUZZ) +if(PCM_FUZZ) find_package(OpenSSL REQUIRED) set(SSL_LIBS OpenSSL::SSL OpenSSL::Crypto) add_executable(urltest-fuzz urltest-fuzz.cpp) diff --git a/tests/fuzz.sh b/tests/fuzz.sh index 2ca138c0..d49b4075 100644 --- a/tests/fuzz.sh +++ b/tests/fuzz.sh @@ -15,7 +15,7 @@ export LSAN_OPTIONS=suppressions="pcm_asan_suppression_file" echo "Running fuzz tests with running time multiplier $factor" -CC=`which clang` CXX=`which clang++` cmake .. -DCMAKE_BUILD_TYPE=Debug -DFUZZ=1 -DPCM_NO_ASAN=OFF && mkdir -p corpus && +CC=`which clang` CXX=`which clang++` cmake .. -DCMAKE_BUILD_TYPE=Debug -DPCM_FUZZ=ON && mkdir -p corpus && make urltest-fuzz \ pcm-fuzz \ pcm-memory-fuzz \