summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2012-03-24 21:39:10 +0000
committerguenther <guenther@openbsd.org>2012-03-24 21:39:10 +0000
commita86e12601c48964dcb48dcb3911589cd71332213 (patch)
tree8c13af5a4483d6b379d6a8758c2be90f54b7543a
parentsync (diff)
downloadwireguard-openbsd-a86e12601c48964dcb48dcb3911589cd71332213.tar.xz
wireguard-openbsd-a86e12601c48964dcb48dcb3911589cd71332213.zip
Another tiny test case
-rw-r--r--regress/lib/libpthread/pthread_mutex/pthread_mutex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/lib/libpthread/pthread_mutex/pthread_mutex.c b/regress/lib/libpthread/pthread_mutex/pthread_mutex.c
index 014cde9292e..f15ef37f64d 100644
--- a/regress/lib/libpthread/pthread_mutex/pthread_mutex.c
+++ b/regress/lib/libpthread/pthread_mutex/pthread_mutex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread_mutex.c,v 1.9 2012/02/23 07:54:40 guenther Exp $ */
+/* $OpenBSD: pthread_mutex.c,v 1.10 2012/03/24 21:39:10 guenther Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors,
* proven@mit.edu All rights reserved.
@@ -250,6 +250,9 @@ test_mutex_normal(void)
ts.tv_sec += 2;
ASSERTe(pthread_mutex_timedlock(&mutex_normal, &ts), == ETIMEDOUT);
CHECKr(pthread_mutex_unlock(&mutex_normal));
+ /* verify that it can still be locked and unlocked */
+ CHECKr(pthread_mutex_lock(&mutex_normal));
+ CHECKr(pthread_mutex_unlock(&mutex_normal));
CHECKr(pthread_create(&thread, NULL, thread_deadlock, &mutex_normal));
sleep(1);
}