commit | 2dec3d7021fca57721ca7cd973d63ef817557aee | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Fri Feb 02 15:45:24 2018 -0800 |
committer | Yabin Cui <yabinc@google.com> | Fri Feb 02 15:45:24 2018 -0800 |
tree | 138d1d646af52de9a7c10f05fa143649883489a4 | |
parent | 5a00ba7c1c5d563b58255257898fe0a5903933eb [diff] [blame] |
Avoid abort when calling pthread_mutex_destroy more than once. Bug: http://b/72878088 Test: run bionic-unit-tests. Change-Id: I0c3a6c5a625d187d5f32ec8c821cfdd5e807a671
diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp index 40059d0..8ac5223 100644 --- a/tests/pthread_test.cpp +++ b/tests/pthread_test.cpp
@@ -1672,6 +1672,7 @@ void destroy() { ASSERT_EQ(0, pthread_mutex_destroy(&lock)); + ASSERT_EQ(EBUSY, pthread_mutex_destroy(&lock)); } DISALLOW_COPY_AND_ASSIGN(PthreadMutex);