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 <jda...@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-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org