Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
f49a4068
Commit
f49a4068
authored
Oct 26, 2012
by
Mukund Sivaraman
Browse files
[master] Disable MutexTest.destoryLocked on Solaris
parent
dc3884d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
f49a4068
...
...
@@ -217,6 +217,10 @@ case "$host" in
CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
# "now" binding is necessary to prevent deadlocks in C++ static initialization code
LDFLAGS="$LDFLAGS -z now"
# Destroying locked mutexes, condition variables being waited
# on, etc. are undefined behavior on Solaris, so we set it as
# such here.
AC_DEFINE([HAS_UNDEFINED_PTHREAD_BEHAVIOR], [1], [Does this platform have some undefined pthreads behavior?])
;;
*-apple-darwin*)
# Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use
...
...
src/lib/util/threads/tests/lock_unittest.cc
View file @
f49a4068
...
...
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <gtest/gtest.h>
#include <util/threads/sync.h>
...
...
@@ -46,11 +48,11 @@ TEST(MutexTest, lockMultiple) {
#endif // ENABLE_DEBUG
#ifndef HAS_UNDEFINED_PTHREAD_BEHAVIOR
// Destroying a locked mutex is a bad idea as well
#ifdef EXPECT_DEATH
TEST
(
MutexTest
,
destroyLocked
)
{
if
(
!
isc
::
util
::
unittests
::
runningOnValgrind
())
{
EXPECT_DEATH
({
EXPECT_DEATH
_IF_SUPPORTED
({
Mutex
*
mutex
=
new
Mutex
;
new
Mutex
::
Locker
(
*
mutex
);
delete
mutex
;
...
...
@@ -59,7 +61,7 @@ TEST(MutexTest, destroyLocked) {
},
""
);
}
}
#endif
#endif
// !HAS_UNDEFINED_PTHREAD_BEHAVIOR
// In this test, we try to check if a mutex really locks. We could try that
// with a deadlock, but that's not practical (the test would not end).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment