diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 30 | ||||
-rw-r--r-- | tests/Makefile | 2 | ||||
-rw-r--r-- | tests/condvar2.c | 2 | ||||
-rw-r--r-- | tests/condvar2_1.c | 2 | ||||
-rw-r--r-- | tests/condvar3_1.c | 2 | ||||
-rw-r--r-- | tests/condvar3_2.c | 2 | ||||
-rw-r--r-- | tests/context1.c | 2 | ||||
-rw-r--r-- | tests/priority1.c | 8 | ||||
-rw-r--r-- | tests/sizes.c | 2 | ||||
-rw-r--r-- | tests/test.h | 1 |
10 files changed, 41 insertions, 12 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index e62c257..7213eb4 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,16 +1,30 @@ 2004-05-16 Ross Johnson <rpj@callisto.canberra.edu.au>
- * cancel9.c: New test. - * cancel3.c: Remove inappropriate conditional compilation; - GNU C version of test suite no longer quietly skips this test. - * cancel5.c: Likewise. - * GNUmakefile: Can now build individual test app using default - C version of library using 'make clean testname.c'. - * Makefile: Likewise for VC using 'nmake clean test testname.c'. + * condvar2.c (WIN32_WINNT): Define to avoid redefinition warning + from inclusion of implement.h. + * convar2_1.c: Likewise. + * condvar3_1.c: Likewise. + * condvar3_2.c: Likewise. + * context1.c: Likewise. + * sizes.c: Likewise. + * Makefile: Don't define _WIN32_WINNT on compiler command line. + * GNUmakefile: Likewise. + * priority1.c (main): Add column to output for actual win32 + priority. + +2004-05-16 Ross Johnson <rpj@callisto.canberra.edu.au>
+ + * cancel9.c: New test.
+ * cancel3.c: Remove inappropriate conditional compilation;
+ GNU C version of test suite no longer quietly skips this test.
+ * cancel5.c: Likewise.
+ * GNUmakefile: Can now build individual test app using default
+ C version of library using 'make clean testname.c'.
+ * Makefile: Likewise for VC using 'nmake clean test testname.c'.
2003-10-14 Ross Johnson <rpj@callisto.canberra.edu.au>
- * Wmakefile: New makefile for Watcom testing. + * Wmakefile: New makefile for Watcom testing.
2003-09-18 Ross Johnson <rpj@callisto.canberra.edu.au>
diff --git a/tests/Makefile b/tests/Makefile index 17cb0c8..1a7d81c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -66,7 +66,7 @@ VCXFLAGS = /GX /TP /D__CLEANUP_C CPLIB = pthreadVC.lib
CPDLL = pthreadVC.dll
-CFLAGS= $(OPTIM) /W3 /WX /MD /nologo /Yd /Zi -D_WIN32_WINNT=0x400
+CFLAGS= $(OPTIM) /W3 /WX /MD /nologo /Yd /Zi
LFLAGS= /INCREMENTAL:NO
INCLUDES=-I.
BUILD_DIR=..
diff --git a/tests/condvar2.c b/tests/condvar2.c index 982bd7f..7946cea 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -73,6 +73,8 @@ * - Process returns non-zero exit status. */ +#define _WIN32_WINNT 0x400 + #include "test.h" #include <sys/timeb.h> diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index 7a61fdf..e849ff1 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -73,6 +73,8 @@ * - Process returns non-zero exit status. */ +#define _WIN32_WINNT 0x400 + #include "test.h" #include <sys/timeb.h> diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 59ba596..200aaf9 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -75,6 +75,8 @@ * - Process returns non-zero exit status. */ +#define _WIN32_WINNT 0x400 + #include "test.h" #include <sys/timeb.h> diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index a5cb848..865ca9d 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -75,6 +75,8 @@ * - Process returns non-zero exit status. */ +#define _WIN32_WINNT 0x400 + #include "test.h" #include <sys/timeb.h> diff --git a/tests/context1.c b/tests/context1.c index 29005dc..405f9da 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -71,6 +71,8 @@ * - Process returns non-zero exit status. */ +#define _WIN32_WINNT 0x400 + #include "test.h" #include "../implement.h" diff --git a/tests/priority1.c b/tests/priority1.c index 1dc6ea7..c68e506 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -148,22 +148,24 @@ main() PTW32TEST_THREAD_INIT_PRIO); printf("Using pthread_getschedparam\n"); - printf("%10s %10s\n", "Set value", "Get value"); + printf("%10s %10s %10s\n", "Set value", "Get value", "Win priority"); for (param.sched_priority = minPrio; param.sched_priority <= maxPrio; param.sched_priority++) { + int prio; + assert(pthread_attr_setschedparam(&attr, ¶m) == 0); assert(pthread_create(&t, &attr, func, (void *) &attr) == 0); - assert(GetThreadPriority(pthread_getw32threadhandle_np(t)) + assert((prio = GetThreadPriority(pthread_getw32threadhandle_np(t))) == validPriorities[param.sched_priority+(PTW32TEST_MAXPRIORITIES/2)]); assert(pthread_join(t, &result) == 0); assert(param.sched_priority == (int) result); - printf("%10d %10d\n", param.sched_priority, (int) result); + printf("%10d %10d %10d\n", param.sched_priority, (int) result, prio); } return 0; diff --git a/tests/sizes.c b/tests/sizes.c index 709c610..da7e115 100644 --- a/tests/sizes.c +++ b/tests/sizes.c @@ -1,3 +1,5 @@ +#define _WIN32_WINNT 0x400 + #include "test.h" #include "../implement.h" diff --git a/tests/test.h b/tests/test.h index 203e332..072b797 100644 --- a/tests/test.h +++ b/tests/test.h @@ -41,6 +41,7 @@ #include "pthread.h" #include "sched.h" #include "semaphore.h" + #include <windows.h> #include <stdio.h> |