summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cancel2.c5
-rw-r--r--tests/rwlock7.c4
2 files changed, 6 insertions, 3 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);
diff --git a/tests/rwlock7.c b/tests/rwlock7.c
index cf20bfd..ff2db21 100644
--- a/tests/rwlock7.c
+++ b/tests/rwlock7.c
@@ -10,7 +10,7 @@
#define THREADS 5
#define DATASIZE 15
-#define ITERATIONS 10000
+#define ITERATIONS 1000000
/*
* Keep statistics for each thread.
@@ -162,7 +162,7 @@ main (int argc, char *argv[])
_ftime(&currSysTime2);
- printf( "\nstart: %d/%d, stop: %d/%d, duration:%d\n",
+ printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n",
currSysTime1.time,currSysTime1.millitm,
currSysTime2.time,currSysTime2.millitm,
(currSysTime2.time*1000+currSysTime2.millitm) -