summaryrefslogtreecommitdiff
path: root/tests/cancel2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cancel2.c')
-rw-r--r--tests/cancel2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/cancel2.c b/tests/cancel2.c
index 3a7c2c5..f1b5106 100644
--- a/tests/cancel2.c
+++ b/tests/cancel2.c
@@ -138,6 +138,7 @@ main()
{
int failed = 0;
int i;
+ int ret;
pthread_t t[NUMTHREADS + 1];
assert((t[0] = pthread_self()) != NULL);
@@ -155,7 +156,9 @@ main()
*/
Sleep(500);
- assert(pthread_mutex_unlock(&waitLock) == 0);
+ ret = pthread_mutex_unlock(&waitLock);
+ assert(ret != EPERM);
+ assert(ret == 0);
Sleep(500);