This is an automated email from the ASF dual-hosted git repository.

astitcher 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 408a261  PROTON-2153, PROTON-2159: Fix test related issues - Some asan 
issues seen on freebsd - fix for C++ example runner
408a261 is described below

commit 408a2610eb2f8fe749299b9890a145f0f74383f6
Author: Andrew Stitcher <[email protected]>
AuthorDate: Tue Dec 10 10:39:01 2019 -0500

    PROTON-2153, PROTON-2159: Fix test related issues
    - Some asan issues seen on freebsd
    - fix for C++ example runner
---
 CMakeLists.txt              | 6 ++----
 c/tests/fuzz/CMakeLists.txt | 8 +++++---
 cpp/examples/testme         | 2 +-
 tests/preload_asan.sh       | 8 +++++---
 4 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b7197ff..08b0864 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -351,15 +351,13 @@ if(SWIG_FOUND)
 
   # Prerequisites for Python wrapper:
   find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT)
-  # TODO aconway 2018-09-07: get python binding tests working with sanitizers
-  if (PYTHONLIBS_FOUND AND NOT SANITIZE_FLAGS)
+  if (PYTHONLIBS_FOUND)
     set (DEFAULT_PYTHON ON)
   endif ()
 
   # Prerequisites for Ruby:
   find_package(Ruby)
-  # TODO aconway 2018-09-07: get ruby binding tests working with sanitizers
-  if (RUBY_FOUND AND NOT SANITIZE_FLAGS)
+  if (RUBY_FOUND)
     set (DEFAULT_RUBY ON)
   endif ()
 endif()
diff --git a/c/tests/fuzz/CMakeLists.txt b/c/tests/fuzz/CMakeLists.txt
index 070b691..e0e7094 100644
--- a/c/tests/fuzz/CMakeLists.txt
+++ b/c/tests/fuzz/CMakeLists.txt
@@ -32,7 +32,7 @@ add_library (StandaloneFuzzTargetMain STATIC 
StandaloneFuzzTargetMain.c Standalo
 
 macro (pn_add_fuzz_test test)
   add_executable (${test} ${ARGN})
-  target_link_libraries (${test} qpid-proton-core ${FUZZING_LIBRARY})
+  target_link_libraries (${test} ${FUZZING_LIBRARY})
   list(APPEND fuzz_test_src ${ARGN})
 
   if (FUZZ_REGRESSION_TESTS)
@@ -53,16 +53,18 @@ 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)
 pn_add_fuzz_test (fuzz-message-decode fuzz-message-decode.c)
+target_link_libraries (fuzz-message-decode qpid-proton-core)
 
 # 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_C_SOURCE_DIR}/core/memory.c)
+pn_add_fuzz_test (fuzz-url fuzz-url.c ${PN_C_SOURCE_DIR}/extra/url.c  
${PN_C_SOURCE_DIR}/core/object/object.c ${PN_C_SOURCE_DIR}/core/object/string.c 
${PN_C_SOURCE_DIR}/core/util.c ${PN_C_SOURCE_DIR}/core/memory.c)
 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-proactor)
+  target_link_libraries(fuzz-proactor-receive qpid-proton-core 
qpid-proton-proactor)
 endif()
 
 # Fuzz tests of internals
diff --git a/cpp/examples/testme b/cpp/examples/testme
index b2e7ddd..bc6dab8 100755
--- a/cpp/examples/testme
+++ b/cpp/examples/testme
@@ -50,7 +50,7 @@ mech_list: EXTERNAL DIGEST-MD5 SCRAM-SHA-1 CRAM-MD5 PLAIN 
ANONYMOUS
         f.write(t.substitute(db=db))
     cmd_template = Template("echo password | ${saslpasswd} -c -p -f ${db} -u 
proton user")
     cmd = cmd_template.substitute(db=db, saslpasswd=saslpasswd)
-    check_output(args=cmd, shell=True)
+    check_output(cmd, shell=True)
     os.environ['PN_SASL_CONFIG_PATH'] = abs_conf_dir
 
 # Globally initialize Cyrus SASL configuration
diff --git a/tests/preload_asan.sh b/tests/preload_asan.sh
index e4928f9..7f713a1 100755
--- a/tests/preload_asan.sh
+++ b/tests/preload_asan.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -37,14 +37,16 @@ case $EXE in
 
         # Disable link order check to run with limited sanitizing
         # Still seeing problems.
-        export ASAN_OPTIONS=verify_asan_link_order=0
+        ASAN_OPTIONS=verify_asan_link_order=0
+        export ASAN_OPTIONS
         ;;
     *)
         # Preload the asan library linked to LIB. Note we need to
         # check the actual linkage, there may be multiple asan lib
         # versions installed and we must use the same one.
         libasan=$(ldd $LIB | awk "/(libasan\\.so[.0-9]*)/ { print \$1 }")
-        export LD_PRELOAD="$libasan:$LD_PRELOAD"
+        LD_PRELOAD="$libasan:$LD_PRELOAD"
+        export LD_PRELOAD
         ;;
 esac
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to