summaryrefslogtreecommitdiff
path: root/regress/lib/libpthread
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-03-24 21:39:11 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-03-24 21:39:11 +0000
commitcc60eadc8413e6deeddf569a14fdacaeeb308457 (patch)
tree45deeaf0f4975dd180311b67524dd64f069bdac3 /regress/lib/libpthread
parentd4bf1dd4d1abf4cd192a5302e04ad3f8ce46e9cc (diff)
Another tiny test case
Diffstat (limited to 'regress/lib/libpthread')
-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);
}