am 847e52b9: Merge "Prevent a few test pthread keys from leaking."
* commit '847e52b9b7bca9dee20e33d1006dfc23885e7494': Prevent a few test pthread keys from leaking.
This commit is contained in:
commit
95742d3603
@ -105,6 +105,7 @@ TEST(pthread, pthread_key_fork) {
|
|||||||
ASSERT_EQ(99, WEXITSTATUS(status));
|
ASSERT_EQ(99, WEXITSTATUS(status));
|
||||||
|
|
||||||
ASSERT_EQ(expected, pthread_getspecific(key));
|
ASSERT_EQ(expected, pthread_getspecific(key));
|
||||||
|
ASSERT_EQ(0, pthread_key_delete(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* DirtyKeyFn(void* key) {
|
static void* DirtyKeyFn(void* key) {
|
||||||
@ -132,6 +133,7 @@ TEST(pthread, pthread_key_dirty) {
|
|||||||
ASSERT_EQ(nullptr, result); // Not ~0!
|
ASSERT_EQ(nullptr, result); // Not ~0!
|
||||||
|
|
||||||
ASSERT_EQ(0, munmap(stack, stack_size));
|
ASSERT_EQ(0, munmap(stack, stack_size));
|
||||||
|
ASSERT_EQ(0, pthread_key_delete(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* IdFn(void* arg) {
|
static void* IdFn(void* arg) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user