You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2019/12/26 13:44:02 UTC
[qpid-proton] branch master updated: PROTON-2078: Upstream
c/test/fuzz patches from oss-fuzz (#224)
This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/master by this push:
new 364589a PROTON-2078: Upstream c/test/fuzz patches from oss-fuzz (#224)
364589a is described below
commit 364589a3e3ac0d1b0c188e8053155b8476629e49
Author: Jiří Daněk <jd...@redhat.com>
AuthorDate: Thu Dec 26 14:43:53 2019 +0100
PROTON-2078: Upstream c/test/fuzz patches from oss-fuzz (#224)
* [c] prefer linking with static library in fuzz tests
---
c/tests/fuzz/CMakeLists.txt | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/c/tests/fuzz/CMakeLists.txt b/c/tests/fuzz/CMakeLists.txt
index 774c52c..aa6d49e 100644
--- a/c/tests/fuzz/CMakeLists.txt
+++ b/c/tests/fuzz/CMakeLists.txt
@@ -22,6 +22,15 @@ add_definitions(${COMPILE_WARNING_FLAGS} ${COMPILE_PLATFORM_FLAGS})
option(FUZZ_REGRESSION_TESTS "Run fuzz tests with regression test driver" ON)
option(FUZZ_LONG_TESTS "Run fuzz tests that take a long time" OFF)
+# prefer static lib for the fuzzer, if available
+if (BUILD_STATIC_LIBS)
+ set(FUZZING_QPID_PROTON_CORE_LIBRARY qpid-proton-core-static)
+ set(FUZZING_QPID_PROTON_PROACTOR_LIBRARY qpid-proton-proactor-static)
+else()
+ set(FUZZING_QPID_PROTON_CORE_LIBRARY qpid-proton-core)
+ set(FUZZING_QPID_PROTON_PROACTOR_LIBRARY qpid-proton-proactor)
+endif()
+
if (FUZZ_REGRESSION_TESTS)
set(FUZZING_LIBRARY StandaloneFuzzTargetMain)
else ()
@@ -56,9 +65,9 @@ unset(fuzz_test_src)
# Fuzz tests at the User API level
pn_add_fuzz_test (fuzz-connection-driver fuzz-connection-driver.c)
-target_link_libraries (fuzz-connection-driver qpid-proton-core)
+target_link_libraries (fuzz-connection-driver ${FUZZING_QPID_PROTON_CORE_LIBRARY})
pn_add_fuzz_test (fuzz-message-decode fuzz-message-decode.c)
-target_link_libraries (fuzz-message-decode qpid-proton-core)
+target_link_libraries (fuzz-message-decode ${FUZZING_QPID_PROTON_CORE_LIBRARY})
# pn_url_parse is not in proton core and is only used by messenger so compile specially
set(platform_MSVC ${PN_C_SOURCE_DIR}/compiler/msvc/snprintf.c)
@@ -77,7 +86,7 @@ target_compile_definitions(fuzz-url PRIVATE PROTON_DECLARE_STATIC)
# This regression test can take a very long time so don't run by default
if(HAS_PROACTOR AND FUZZ_LONG_TESTS)
pn_add_fuzz_test (fuzz-proactor-receive fuzz-proactor-receive.c)
- target_link_libraries(fuzz-proactor-receive qpid-proton-core qpid-proton-proactor)
+ target_link_libraries(fuzz-proactor-receive ${FUZZING_QPID_PROTON_CORE_LIBRARY} ${FUZZING_QPID_PROTON_PROACTOR_LIBRARY})
endif()
# Fuzz tests of internals
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org