You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/09/11 20:28:42 UTC

qpid-proton git commit: NO-JIRA: [c] Fix link error in fuzz tests.

Repository: qpid-proton
Updated Branches:
  refs/heads/master 393f8a677 -> f963e4fc4


NO-JIRA: [c] Fix link error in fuzz tests.

Linking the URL fuzz test directly with util.c breaks as it now depends on
private symbols in the core library. Instead link with libqpid-proton which
includes everything required.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f963e4fc
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f963e4fc
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f963e4fc

Branch: refs/heads/master
Commit: f963e4fc4684a92557bfb353f6470ffafc7487ae
Parents: 393f8a6
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Sep 11 15:17:16 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Sep 11 15:17:16 2018 -0400

----------------------------------------------------------------------
 c/tests/fuzz/CMakeLists.txt | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f963e4fc/c/tests/fuzz/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/c/tests/fuzz/CMakeLists.txt b/c/tests/fuzz/CMakeLists.txt
index 5d4187d..1af7e50 100644
--- a/c/tests/fuzz/CMakeLists.txt
+++ b/c/tests/fuzz/CMakeLists.txt
@@ -30,10 +30,9 @@ endif ()
 
 add_library (StandaloneFuzzTargetMain STATIC StandaloneFuzzTargetMain.c StandaloneFuzzTargetInit.c)
 
-macro (pn_add_fuzz_test test)
+macro (pn_add_fuzz_test_no_proton test)
   add_executable (${test} ${ARGN})
-  target_link_libraries (${test} qpid-proton-core ${FUZZING_LIBRARY})
-
+  target_link_libraries (${test} ${FUZZING_LIBRARY})
   if (FUZZ_REGRESSION_TESTS)
     # StandaloneFuzzTargetMain cannot walk directory trees
     file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/${test}/*)
@@ -41,14 +40,20 @@ macro (pn_add_fuzz_test test)
   else ()
     add_test (NAME ${test} COMMAND $<TARGET_FILE:${test}> -runs=1 ${CMAKE_CURRENT_SOURCE_DIR}/${test}>)
   endif ()
-endmacro(pn_add_fuzz_test)
+endmacro(pn_add_fuzz_test_no_proton)
+
+macro (pn_add_fuzz_test test)
+  pn_add_fuzz_test_no_proton (${test} ${ARGN})
+  target_link_libraries (${test} qpid-proton-core ${FUZZING_LIBRARY})
+endmacro (pn_add_fuzz_test)
 
 # Fuzz tests at the User API level
 pn_add_fuzz_test (fuzz-connection-driver fuzz-connection-driver.c)
 pn_add_fuzz_test (fuzz-message-decode fuzz-message-decode.c)
 
-# pn_url_parse is not in proton core and is only used by messenger so compile specially
-pn_add_fuzz_test (fuzz-url fuzz-url.c ${PN_C_SOURCE_DIR}/extra/url.c ${PN_C_SOURCE_DIR}/core/util.c)
+# pn_url_parse is not in qpid-proton-core so link with qpid-proton instead
+pn_add_fuzz_test_no_proton (fuzz-url fuzz-url.c)
+target_link_libraries (fuzz-url qpid-proton ${FUZZING_LIBRARY})
 
 # This regression test can take a very long time so don't run by default
 if(HAS_PROACTOR AND FUZZ_LONG_TESTS)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org