From 040dbc3e49f306404fe50ec240a1151e109170f9 Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Mon, 2 Mar 2015 18:43:13 +0100 Subject: [PATCH] [3710] Use undefined pthread behavior for FreeBSD. This prevents failure of the CondVar unit tests which expect that the pthread_cond_destroy returns error code if the other thread is blocked on the conditional variable which is being destroyed. --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index de5c262c95..65810afe67 100644 --- a/configure.ac +++ b/configure.ac @@ -278,6 +278,17 @@ case "$host" in ENV_LIBRARY_PATH=DYLD_LIBRARY_PATH ;; *-freebsd*) + # On FreeBSD10.1 pthread_cond_destroy doesn't work as documented, which + # causes the CondVarTest.destroyWhileWait test to fail. According to the + # pthread_cond_destroy documentation for FreeBSD, this function should + # return EBUSY error when there is a thread waiting for the conditional + # variable, whereas this function returned success code. We treat it here + # as an undefined behavior. Also note that this issue was only visible + # when gtest 1.7 was in use, because the previous versions of gtest + # didn't seem to have support for the death tests on FreeBSD. As a + # result, the test was not executed and the error didn't occur. + kea_undefined_pthread_behavior=yes + SET_ENV_LIBRARY_PATH=yes ;; *-netbsd*) -- 2.47.2