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/10/18 04:41:15 UTC

[qpid-dispatch] branch master updated (a96e6ae -> 1c7203b)

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

jdanek pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git.


    from a96e6ae  DISPATCH-1454 - Fixed test_12 to use instanceof instead of __class__ and skipped test_39 until proton bug gets fixed
     new f81b834  DISPATCH-1384 - Disable inlining of functions that are mocked in unit_tests
     new 1c7203b  DISPATCH-1384 - Enable flat namespace on macOS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CMakeLists.txt | 8 ++++++--
 src/server.c   | 1 +
 src/timer.c    | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)


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


[qpid-dispatch] 01/02: DISPATCH-1384 - Disable inlining of functions that are mocked in unit_tests

Posted by jd...@apache.org.
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-dispatch.git

commit f81b834769d9426679183b498a7b3e0162bc8fed
Author: Jiri Danek <jd...@redhat.com>
AuthorDate: Wed Oct 16 23:46:00 2019 +0200

    DISPATCH-1384 - Disable inlining of functions that are mocked in unit_tests
    
    The timer_test.c relies on being able to provide its own dummy versions
    of `qd_timer_now` and `qd_server_timeout`. That is not possible if these
    functions are inlined in the .dynlib. Clang on macOS inlines them,
    GCC on Linux doesn't (that's why the tests pass on Linux)
---
 src/server.c | 1 +
 src/timer.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/server.c b/src/server.c
index 7707efb..69ed73f 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1524,6 +1524,7 @@ bool qd_connector_decref(qd_connector_t* ct)
     return false;
 }
 
+__attribute__((noinline)) // permit replacement by dummy implementation in unit_tests
 void qd_server_timeout(qd_server_t *server, qd_duration_t duration) {
     pn_proactor_set_timeout(server->proactor, duration);
 }
diff --git a/src/timer.c b/src/timer.c
index f0f5e2d..f01cb53 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -114,6 +114,7 @@ void qd_timer_free(qd_timer_t *timer)
 }
 
 
+__attribute__((noinline)) // permit replacement by dummy implementation in unit_tests
 qd_timestamp_t qd_timer_now() {
     struct timespec tv;
     clock_gettime(CLOCK_MONOTONIC, &tv);


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


[qpid-dispatch] 02/02: DISPATCH-1384 - Enable flat namespace on macOS

Posted by jd...@apache.org.
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-dispatch.git

commit 1c7203b2518e343bb4c5d774a2a7179555ef2793
Author: Jiri Danek <jd...@redhat.com>
AuthorDate: Thu Oct 17 08:05:47 2019 +0200

    DISPATCH-1384 - Enable flat namespace on macOS
    
    -flat_namespace overrides macOS default of -two_levelnamespace,
    to make the behavior more like Linux; also should compensate for lack
    of -Wl,-z,defs on macOS.
---
 CMakeLists.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 163bfcf..6f4f4c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,9 +191,13 @@ if (CMAKE_C_COMPILER_ID MATCHES "Clang")
   add_compile_options(-Wno-gnu-statement-expression)
 endif()
 
-if (NOT (APPLE OR USE_SANITIZERS OR USE_TSAN))
+if (APPLE)
+  set(CATCH_UNDEFINED "-Wl,-flat_namespace")
+elseif(NOT (USE_SANITIZERS OR USE_TSAN))
   set(CATCH_UNDEFINED "-Wl,-z,defs")
-endif ()
+else(APPLE)
+  set(CATCH_UNDEFINED "")
+endif(APPLE)
 
 ##
 ## Header file installation


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