diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /PACE/tests | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'PACE/tests')
-rw-r--r-- | PACE/tests/Cond_Var_Test.c | 136 | ||||
-rw-r--r-- | PACE/tests/Makefile | 204 | ||||
-rw-r--r-- | PACE/tests/Makefile.am | 54 | ||||
-rw-r--r-- | PACE/tests/Posix_SP_Test.c | 253 | ||||
-rw-r--r-- | PACE/tests/Pthread_Storage_Test.c | 144 | ||||
-rw-r--r-- | PACE/tests/Pthreads_Test.c | 110 | ||||
-rw-r--r-- | PACE/tests/README | 6 | ||||
-rw-r--r-- | PACE/tests/Stat_Test.c | 83 | ||||
-rw-r--r-- | PACE/tests/Stdio_Test.c | 123 | ||||
-rw-r--r-- | PACE/tests/mqueue_test.c | 134 | ||||
-rw-r--r-- | PACE/tests/test_stdio.dsp | 162 | ||||
-rw-r--r-- | PACE/tests/tests.dsw | 59 | ||||
-rw-r--r-- | PACE/tests/vxworks_stub.c | 109 |
13 files changed, 0 insertions, 1577 deletions
diff --git a/PACE/tests/Cond_Var_Test.c b/PACE/tests/Cond_Var_Test.c deleted file mode 100644 index eb7a073cfc3..00000000000 --- a/PACE/tests/Cond_Var_Test.c +++ /dev/null @@ -1,136 +0,0 @@ -/* $Id$ -*- C -*- */ - -/* ===================================================================== */ -/* */ -/* = FILENAME */ -/* Cond_Var_Test.c */ -/* */ -/* = DESCRIPTION */ -/* Testing the platform for POSIX condition variables. This is not */ -/* meant to be an exhaustive test at this point but more a sanity */ -/* check that PACE works (at least somewhat) as advertised. */ -/* This program simply creates some threads, waits on a condition */ -/* variable, joins the threads, and then exits. */ -/* */ -/* This test is largely taken from the O'Reilly _Pthreads */ -/* Programming_ book and accompanying example code. */ -/* */ -/* = AUTHOR */ -/* Joe Hoffert <joeh@cs.wustl.edu> */ -/* */ -/* ===================================================================== */ - -#include "pace/stdio.h" -#include "pace/stdlib.h" -#include "pace/pthread.h" - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -#include "vxworks_stub.c" -#endif /* VXWORKS */ - -#define NUM_THREADS 3 -#define TCOUNT 10 -#define COUNT_THRES 12 - -int count = 0; -int thread_ids[3] = {0,1,2}; -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -/* VxWorks does not handle the *_ININITALIZER values and we - * can not emulate it since it involves memory allocation for - * VxWorks. - */ -pace_pthread_mutex_t count_lock; -pace_pthread_cond_t count_hit_threshold; -#else -pace_pthread_mutex_t count_lock = PACE_PTHREAD_MUTEX_INITIALIZER; -pace_pthread_cond_t count_hit_threshold = PACE_PTHREAD_COND_INITIALIZER; -#endif - -void *inc_count(void *idp) -{ - int i = 0; - /*int *my_id = idp;*/ - PACE_UNUSED_ARG (idp); - - pace_sleep(1); - - for (i = 0; i < TCOUNT; i++) { - pace_pthread_mutex_lock(&count_lock); - count++; - /* pace_printf("inc_counter(): thread %d, count = %d, unlocking mutex\n", - *my_id, count); */ - if (count == COUNT_THRES) { - /* pace_printf("inc_count(): Thread %d, count %d\n", *my_id, count); */ - pace_pthread_cond_signal(&count_hit_threshold); - } - pace_pthread_mutex_unlock(&count_lock); - } - - return(NULL); -} - -void *watch_count(void *idp) -{ - /*int *my_id = idp;*/ - PACE_UNUSED_ARG (idp); - - /* pace_printf("watch_count(): thread %d\n", *my_id); */ - - pace_pthread_mutex_lock(&count_lock); - - while (count < COUNT_THRES) { - pace_pthread_cond_wait(&count_hit_threshold, &count_lock); - /* pace_printf("watch_count(): thread %d, count %d\n", *my_id, count); */ - } - - pace_pthread_mutex_unlock(&count_lock); - - return(NULL); -} - -int -main() -{ - int i; - pace_pthread_t threads[3]; - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 - /* VxWorks does not handle the *_ININITALIZER values and we - * can not emulate it since it involves memory allocation for - * VxWorks. - */ - pace_pthread_mutex_init(&count_lock, 0); - pace_pthread_cond_init(&count_hit_threshold, 0); -#endif - - pace_pthread_create(&threads[0], NULL, inc_count, (void *)&thread_ids[0]); - pace_pthread_create(&threads[1], NULL, inc_count, (void *)&thread_ids[1]); - pace_pthread_create(&threads[2], NULL, watch_count, (void *)&thread_ids[2]); - - for (i = 0; i < NUM_THREADS; i++) { - pace_pthread_join(threads[i], NULL); - } - - if (count < COUNT_THRES) - { - pace_printf ("### ERROR ###: count should be >= %d.\n", - COUNT_THRES); - pace_printf ("### ERROR ###: However, count == %d.\n", - count); - pace_exit (-1); - } - - /* pace_printf ("main(): This should be the last print statement.\n"); */ - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 - /* VxWorks does not handle the *_ININITALIZER values and we - * can not emulate it since it involves memory allocation for - * VxWorks. We need to explicitly delete the mutex and condition - * variable allocated by the init calls. - */ - pace_pthread_mutex_destroy(&count_lock); - pace_pthread_cond_destroy(&count_hit_threshold); -#endif /* PACE_VXWORKS && PACE_VXWORKS != 0 */ - - return 0; -} diff --git a/PACE/tests/Makefile b/PACE/tests/Makefile deleted file mode 100644 index 83e9eb5be83..00000000000 --- a/PACE/tests/Makefile +++ /dev/null @@ -1,204 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -# Makefile for all the PACE tests -#---------------------------------------------------------------------------- - -CFLAGS += -DPACE_HAS_ALL_POSIX_FUNCS - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -# Build POSIX_SP_Test conditionally. For some platforms, it doesn't build -# (which is actually the test of support for the #defines). -BIN = Cond_Var_Test \ - Pthread_Storage_Test \ - Pthreads_Test \ - Stdio_Test \ - Stat_Test - -BIN2 = mqueue_test \ - Posix_SP_Test - -#### If the PACE library wasn't built with all components, don't -#### try to build certain tests. -PACE_BUILD_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --pace) - -PSRC=$(addsuffix .c,$(BIN)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -ACELIB = - -# Don't include Posix_SP_Test and mqueue_test for a VxWorks build. -# Posix_SP_Test doesn't compile (which is the test - seeing if the symbols -# are available). So VxWorks obviously doesn't pass this test. -# SA_RESTART is not defined for VxWorks so mqueue_test doesn't build -# on that platform. -ifdef VXWORKS - ACELIB += -lPACE - LDFLAGS += -L$(PACE_ROOT)/pace/ -else - BIN += $(BIN2) -endif -INCLDIRS += -I$(PACE_ROOT) -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -ifndef SOEXT - SOEXT=so -endif - -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -include $(ACE_ROOT)/PACE/include/makeinclude/rules.common.GNU - -ifndef static_libs_only - ifndef shared_libs_only - static_libs_only = 1 - endif # shared_libs_only -endif # static_libs_only - -# If we are inlining the PACE functions then we don't want to include -# the PACE library (and we need to define PACE_HAS_INLINE). If we're not -# inlining then we need to include the PACE library. Inlining is the default. - -ifndef inline - CFLAGS += -DPACE_HAS_INLINE -else - ifneq (0,$(inline)) - CFLAGS += -DPACE_HAS_INLINE - else - LIBS += -L$(ACE_ROOT)/PACE/pace -lPACE - endif # ! inline -endif # ! inline - -# To compile in the PACE lib on platforms that compile c code -ifeq (1, $(emulation)) - LIBS += -L$(PACE_ROOT)/pace -lPACE -endif # emulation - -# To build multiple executables in the same directory on AIX, it works -# best to wipe out any previously-created tempinc directory. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc) -endif - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -.obj/Cond_Var_Test.o .obj/Cond_Var_Test.o .obj/Cond_Var_Test.o .obj/Cond_Var_Test.o: Cond_Var_Test.c \ - $(ACE_ROOT)/PACE/pace/stdio.h \ - $(ACE_ROOT)/PACE/pace/config/defines.h \ - $(ACE_ROOT)/PACE/pace/config/platform.h \ - $(ACE_ROOT)/PACE/pace/config/config.h \ - $(ACE_ROOT)/PACE/pace/config/compiler.h \ - $(ACE_ROOT)/PACE/pace/config/constants.h \ - $(ACE_ROOT)/PACE/pace/sys/types.h \ - $(ACE_ROOT)/PACE/pace/config/defaults.h \ - $(ACE_ROOT)/PACE/pace/config/utility.h \ - $(ACE_ROOT)/PACE/pace/errno.h \ - $(ACE_ROOT)/PACE/pace/config/features.h \ - $(ACE_ROOT)/PACE/pace/stdlib.h \ - $(ACE_ROOT)/PACE/pace/unistd.h \ - $(ACE_ROOT)/PACE/pace/pthread.h - -.obj/mqueue_test.o .obj/mqueue_test.o .obj/mqueue_test.o .obj/mqueue_test.o: mqueue_test.c \ - $(ACE_ROOT)/PACE/pace/stdio.h \ - $(ACE_ROOT)/PACE/pace/config/defines.h \ - $(ACE_ROOT)/PACE/pace/config/platform.h \ - $(ACE_ROOT)/PACE/pace/config/config.h \ - $(ACE_ROOT)/PACE/pace/config/compiler.h \ - $(ACE_ROOT)/PACE/pace/config/constants.h \ - $(ACE_ROOT)/PACE/pace/sys/types.h \ - $(ACE_ROOT)/PACE/pace/config/defaults.h \ - $(ACE_ROOT)/PACE/pace/config/utility.h \ - $(ACE_ROOT)/PACE/pace/errno.h \ - $(ACE_ROOT)/PACE/pace/config/features.h \ - $(ACE_ROOT)/PACE/pace/fcntl.h \ - $(ACE_ROOT)/PACE/pace/mqueue.h \ - $(ACE_ROOT)/PACE/pace/signal.h \ - $(ACE_ROOT)/PACE/pace/stdlib.h \ - $(ACE_ROOT)/PACE/pace/unistd.h \ - $(ACE_ROOT)/PACE/pace/string.h - -.obj/Pthread_Storage_Test.o .obj/Pthread_Storage_Test.o .obj/Pthread_Storage_Test.o .obj/Pthread_Storage_Test.o: Pthread_Storage_Test.c \ - $(ACE_ROOT)/PACE/pace/stdio.h \ - $(ACE_ROOT)/PACE/pace/config/defines.h \ - $(ACE_ROOT)/PACE/pace/config/platform.h \ - $(ACE_ROOT)/PACE/pace/config/config.h \ - $(ACE_ROOT)/PACE/pace/config/compiler.h \ - $(ACE_ROOT)/PACE/pace/config/constants.h \ - $(ACE_ROOT)/PACE/pace/sys/types.h \ - $(ACE_ROOT)/PACE/pace/config/defaults.h \ - $(ACE_ROOT)/PACE/pace/config/utility.h \ - $(ACE_ROOT)/PACE/pace/errno.h \ - $(ACE_ROOT)/PACE/pace/config/features.h \ - $(ACE_ROOT)/PACE/pace/stdlib.h \ - $(ACE_ROOT)/PACE/pace/unistd.h \ - $(ACE_ROOT)/PACE/pace/time.h \ - $(ACE_ROOT)/PACE/pace/pthread.h - -.obj/Pthreads_Test.o .obj/Pthreads_Test.o .obj/Pthreads_Test.o .obj/Pthreads_Test.o: Pthreads_Test.c \ - $(ACE_ROOT)/PACE/pace/stdio.h \ - $(ACE_ROOT)/PACE/pace/config/defines.h \ - $(ACE_ROOT)/PACE/pace/config/platform.h \ - $(ACE_ROOT)/PACE/pace/config/config.h \ - $(ACE_ROOT)/PACE/pace/config/compiler.h \ - $(ACE_ROOT)/PACE/pace/config/constants.h \ - $(ACE_ROOT)/PACE/pace/sys/types.h \ - $(ACE_ROOT)/PACE/pace/config/defaults.h \ - $(ACE_ROOT)/PACE/pace/config/utility.h \ - $(ACE_ROOT)/PACE/pace/errno.h \ - $(ACE_ROOT)/PACE/pace/config/features.h \ - $(ACE_ROOT)/PACE/pace/stdlib.h \ - $(ACE_ROOT)/PACE/pace/unistd.h \ - $(ACE_ROOT)/PACE/pace/pthread.h - -.obj/Stdio_Test.o .obj/Stdio_Test.o .obj/Stdio_Test.o .obj/Stdio_Test.o: Stdio_Test.c \ - $(ACE_ROOT)/PACE/pace/stdio.h \ - $(ACE_ROOT)/PACE/pace/config/defines.h \ - $(ACE_ROOT)/PACE/pace/config/platform.h \ - $(ACE_ROOT)/PACE/pace/config/config.h \ - $(ACE_ROOT)/PACE/pace/config/compiler.h \ - $(ACE_ROOT)/PACE/pace/config/constants.h \ - $(ACE_ROOT)/PACE/pace/sys/types.h \ - $(ACE_ROOT)/PACE/pace/config/defaults.h \ - $(ACE_ROOT)/PACE/pace/config/utility.h \ - $(ACE_ROOT)/PACE/pace/errno.h \ - $(ACE_ROOT)/PACE/pace/config/features.h \ - $(ACE_ROOT)/PACE/pace/unistd.h \ - $(ACE_ROOT)/PACE/pace/string.h - -.obj/Stat_Test.o .obj/Stat_Test.o .obj/Stat_Test.o .obj/Stat_Test.o: Stat_Test.c $(ACE_ROOT)/PACE/pace/stdio.h \ - $(ACE_ROOT)/PACE/pace/config/defines.h \ - $(ACE_ROOT)/PACE/pace/config/platform.h \ - $(ACE_ROOT)/PACE/pace/config/config.h \ - $(ACE_ROOT)/PACE/pace/config/compiler.h \ - $(ACE_ROOT)/PACE/pace/config/constants.h \ - $(ACE_ROOT)/PACE/pace/sys/types.h \ - $(ACE_ROOT)/PACE/pace/config/defaults.h \ - $(ACE_ROOT)/PACE/pace/config/utility.h \ - $(ACE_ROOT)/PACE/pace/errno.h \ - $(ACE_ROOT)/PACE/pace/config/features.h \ - $(ACE_ROOT)/PACE/pace/unistd.h \ - $(ACE_ROOT)/PACE/pace/fcntl.h \ - $(ACE_ROOT)/PACE/pace/sys/stat.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/PACE/tests/Makefile.am b/PACE/tests/Makefile.am deleted file mode 100644 index af6f453c2af..00000000000 --- a/PACE/tests/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -##---------------------------------------------------------------------------- -## $Id$ -## -## Makefile.am for all the PACE ``one-button'' tests -##---------------------------------------------------------------------------- - -## -## Process this file with automake to create Makefile.in -## - -## The number in AUTOMAKE_OPTIONS is the minimum required version automake -## needed to process this file. -AUTOMAKE_OPTIONS = 1.4 - -INCLUDES = -I$(top_builddir) -I$(top_srcdir) - -## LDFLAGS = -## Libtool will automatically link against the "proper" library. -## Do not change the "libACE.la." It is not a typographical error! -## -## We override the "LIBS" variable provided by the configure script since -## we should only need to link against the ACE library for these tests. -LDADD = $(top_builddir)/pace/libPACE.la -##LIBS = $(top_builddir)/pace/libPACE.la - -## Build the following test programs when a `make check' is -## issued by the user. -check_PROGRAMS = \ - Posix_SP_Test \ - Stdio_Test - -Posix_SP_Test_SOURCES = Posix_SP_Test.c - -Stdio_Test_SOURCES = Stdio_Test.c - -## The tests we want to run are all of the test programs we are going to build. -## Do not run them if they are cross-compiled. -if PACE_CROSS_COMPILED -TESTS = -else -TESTS = $(check_PROGRAMS) -endif - -## Set up the test environment -##TESTS_ENVIRONMENT = - -## Clean up template repositories, etc. -clean-local: - -rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core - -rm -rf ptrepository Templates.DB gcctemp.c gcctemp so_locations - -## Clean up `log' directory , etc. -distclean-local: - -rm -rf log diff --git a/PACE/tests/Posix_SP_Test.c b/PACE/tests/Posix_SP_Test.c deleted file mode 100644 index 8eccf95fc4c..00000000000 --- a/PACE/tests/Posix_SP_Test.c +++ /dev/null @@ -1,253 +0,0 @@ -/* $Id$ -*- C -*- */ - -/* ===================================================================== - * - * = FILENAME - * Posix_SP_Test.c - * - * = DESCRIPTION - * Testing the platform for POSIX_SINGLE_PROCESS unit of - * functionality. This consists of calls to sysconf, time, and - * uname. - * This is not meant to be an exhaustive test at this point but more - * a sanity check that PACE works (at least somewhat). - * - * = AUTHOR - * Joe Hoffert <joeh@cs.wustl.edu> - * - * ===================================================================== - */ - -#if PACE_LYNXOS != 0x300 -#include "pace/stdio.h" -#include "pace/unistd.h" -#include "pace/time.h" -#include "pace/sys/utsname.h" - -const char * success = "SUCCEEDED"; -const char * failure = "***FAILED***"; - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -#include "vxworks_stub.c" -#endif /* VXWORKS */ - -void -check_sysconf () -{ - long retval; - int index; -#if PACE_HAS_POSIX == PACE_LYNXOS - const int confnamessize = 30; -#else - const int confnamessize = 38; -#endif /* PACE_HAS_POSIX != PACE_LYNXOS */ - - int confnames[] = {_SC_AIO_LISTIO_MAX, - _SC_AIO_MAX, - _SC_AIO_PRIO_DELTA_MAX, - _SC_ARG_MAX, - _SC_CHILD_MAX, - _SC_CLK_TCK, - _SC_DELAYTIMER_MAX, -#if PACE_HAS_POSIX != PACE_LYNXOS - _SC_GETGR_R_SIZE_MAX, - _SC_GETPW_R_SIZE_MAX, - _SC_LOGIN_NAME_MAX, -#endif /* PACE_HAS_POSIX != PACE_LYNXOS */ - _SC_MQ_OPEN_MAX, - _SC_MQ_PRIO_MAX, - _SC_NGROUPS_MAX, - _SC_OPEN_MAX, - _SC_PAGESIZE, - _SC_RTSIG_MAX, - _SC_SEM_NSEMS_MAX, - _SC_SEM_VALUE_MAX, - _SC_SIGQUEUE_MAX, - _SC_STREAM_MAX, -#if PACE_HAS_POSIX != PACE_LYNXOS - _SC_THREAD_DESTRUCTOR_ITERATIONS, - _SC_THREAD_KEYS_MAX, - _SC_THREAD_STACK_MIN, - _SC_THREAD_THREADS_MAX, -#endif /* PACE_HAS_POSIX != PACE_LYNXOS */ - _SC_TIMER_MAX, -#if PACE_HAS_POSIX != PACE_LYNXOS - _SC_TTY_NAME_MAX, -#endif /* PACE_HAS_POSIX != PACE_LYNXOS */ - _SC_TZNAME_MAX, - _SC_ASYNCHRONOUS_IO, - _SC_FSYNC, - _SC_JOB_CONTROL, - _SC_MAPPED_FILES, - _SC_MEMLOCK, - _SC_MEMLOCK_RANGE, - _SC_MEMORY_PROTECTION, - _SC_MESSAGE_PASSING, - _SC_PRIORITIZED_IO, - _SC_PRIORITY_SCHEDULING, - _SC_REALTIME_SIGNALS}; - char * confstrs[] = {"_SC_AIO_LISTIO_MAX", - "_SC_AIO_MAX", - "_SC_AIO_PRIO_DELTA_MAX", - "_SC_ARG_MAX", - "_SC_CHILD_MAX", - "_SC_CLK_TCK", - "_SC_DELAYTIMER_MAX", -#if PACE_HAS_POSIX != PACE_LYNXOS - "_SC_GETGR_R_SIZE_MAX", - "_SC_GETPW_R_SIZE_MAX", - "_SC_LOGIN_NAME_MAX", -#endif /* PACE_HAS_POSIX != PACE_LYNXOS */ - "_SC_MQ_OPEN_MAX", - "_SC_MQ_PRIO_MAX", - "_SC_NGROUPS_MAX", - "_SC_OPEN_MAX", - "_SC_PAGESIZE", - "_SC_RTSIG_MAX", - "_SC_SEM_NSEMS_MAX", - "_SC_SEM_VALUE_MAX", - "_SC_SIGQUEUE_MAX", - "_SC_STREAM_MAX", -#if PACE_HAS_POSIX != PACE_LYNXOS - "_SC_THREAD_DESTRUCTOR_ITERATIONS", - "_SC_THREAD_KEYS_MAX", - "_SC_THREAD_STACK_MIN", - "_SC_THREAD_THREADS_MAX", -#endif /* PACE_HAS_POSIX != PACE_LYNXOS */ - "_SC_TIMER_MAX", -#if PACE_HAS_POSIX != PACE_LYNXOS - "_SC_TTY_NAME_MAX", -#endif /* PACE_HAS_POSIX != PACE_LYNXOS */ - "_SC_TZNAME_MAX", - "_SC_ASYNCHRONOUS_IO", - "_SC_FSYNC", - "_SC_JOB_CONTROL", - "_SC_MAPPED_FILES", - "_SC_MEMLOCK", - "_SC_MEMLOCK_RANGE", - "_SC_MEMORY_PROTECTION", - "_SC_MESSAGE_PASSING", - "_SC_PRIORITIZED_IO", - "_SC_PRIORITY_SCHEDULING", - "_SC_REALTIME_SIGNALS"}; - - PACE_UNUSED_ARG (confstrs); - - /* Success indicated by compilation for this function. */ - /* printf("pace_sysconf %s\n", success); */ - for (index = 0; index < confnamessize; index++) - { - /* Call pace_sysconf() */ - errno = 0; - retval = pace_sysconf(confnames[index]); - - /* Return value of -1 indicates an invalid name or no support - for the functionality associated with the name. POSIX- - conformant platforms may not support all the names. However, - using the names above should not cause compilation errors. - */ - /* printf("pace_sysconf: name == %s\n", confstrs[index]); */ - if (retval == -1) - { - /* printf("retval == %ld\n", retval); */ - if (errno == 0) - { - /* printf("Unsupported name [errno did not change]\n"); */ - } - else - { - printf("invalid name [errno did not change]\n"); - } - } - else - { - /* printf("pace_sysconf: value == %ld\n", retval); */ - } - } - - /* printf("\n"); */ -} - -void -check_time () -{ - long retval; - time_t local_time; - - /* Call pace_time() with time_t * arg */ - local_time = 0; - errno = 0; - retval = pace_time(&local_time); - - /* printf("pace_time %s\n", success); */ - if (retval == -1) - { - printf("errno == %d\n", errno); - } - else - { - /* printf("pace_time (with time_t* arg) == %ld\n", local_time); */ - } - - /* Call pace_time() with NULL arg */ - errno = 0; - retval = pace_time(0); - - if (retval == -1) - { - printf("errno == %d\n", errno); - } - else - { - /* printf("pace_time (with NULL arg) == %ld\n\n", retval); */ - } -} - -void -check_uname () -{ - long retval; - struct utsname name; - - /* Call pace_uname() */ - errno = 0; - retval = pace_uname(&name); - /* printf("pace_uname %s\n", success); */ - - if (retval < 0) - { - printf("pace_uname error: %d\n", errno); - } - else - { - /* printf("pace_uname: uname.sysname == %s\n", name.sysname); */ - /* printf("pace_uname: uname.nodename == %s\n", name.nodename); */ - /* printf("pace_uname: uname.release == %s\n", name.release); */ - /* printf("pace_uname: uname.version == %s\n", name.version); */ - /* printf("pace_uname: uname.machine == %s\n", name.machine); */ - } -} - -int -main (int argc, char **argv) -{ - /* Check the PACE calls to the sysconf POSIX function. */ - check_sysconf(); - - /* Check the PACE calls to the time POSIX function. */ - check_time(); - - /* Check the PACE calls to the uname POSIX function. */ - check_uname(); - - PACE_UNUSED_ARG (argc); - PACE_UNUSED_ARG (argv); - return 0; -} -#else -int -main (int argc, char **argv) -{ - printf("PACE does not support LynxOS 3.0.0.\n"); -} -#endif /* PACE_LYNXOS == 0x300 */ diff --git a/PACE/tests/Pthread_Storage_Test.c b/PACE/tests/Pthread_Storage_Test.c deleted file mode 100644 index 726b3835c1d..00000000000 --- a/PACE/tests/Pthread_Storage_Test.c +++ /dev/null @@ -1,144 +0,0 @@ -/* $Id$ -*- C -*- */ - -/* ===================================================================== */ -/* */ -/* = FILENAME */ -/* Pthreads_Test.c */ -/* */ -/* = DESCRIPTION */ -/* Testing the platform for POSIX threads thread specific storage. */ -/* This is not meant to be an exhaustive test at this point but more */ -/* a sanity check that PACE works (at least somewhat) as advertised. */ -/* This program creates some threads, stores some thread specific */ -/* information in each one (some time information) and then checks */ -/* that the different threads contained different values. */ -/* */ -/* This test is largely taken from the O'Reilly _Pthreads */ -/* Programming_ book and accompanying example code. */ -/* */ -/* = AUTHOR */ -/* Joe Hoffert <joeh@cs.wustl.edu> */ -/* */ -/* ===================================================================== */ - -#include "pace/stdio.h" -#include "pace/stdlib.h" -#include "pace/time.h" -#include "pace/pthread.h" - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -#include "vxworks_stub.c" -#endif /* VXWORKS */ - -#define NUM_THREADS 3 -/*pace_pthread_key_t saved_time_key;*/ -pace_pthread_key_t saved_ID_key; - -/*void free_time (void *arg)*/ -void free_ID (void *arg) -{ - /*pace_timespec *timep = (pace_timespec *)arg; - pace_printf("free_time:\n"); - pace_free(timep);*/ - - pace_pthread_t *threadp = (pace_pthread_t *)arg; - /* pace_printf("free_ID:\n"); */ - pace_free(threadp); -} - -/*void save_the_time (void)*/ -long save_the_ID (void) -{ - /*pace_timespec *timep; - - timep = (pace_timespec *)malloc(sizeof(pace_timespec)); - clock_gettime(1, timep); - pace_printf("save_the_time: \t\t%ld %ld\n",timep->tv_sec, timep->tv_nsec); - pace_pthread_setspecific(saved_time_key, (void *)timep);*/ - - pace_pthread_t *pace_thread = - (pace_pthread_t *)malloc(sizeof(pace_pthread_t)); - - *pace_thread = pace_pthread_self(); - /* pace_printf("save_the_ID: \t\t%ld\n", (long)*pace_thread); */ - pace_pthread_setspecific(saved_ID_key, (void *)pace_thread); - - return ((long)*pace_thread); -} - -/*void what_time_did_i_save (void)*/ -long what_ID_did_i_save (void) -{ - /*pace_timespec *timep; - - timep = pace_pthread_getspecific(saved_time_key); - printf("what_time_did_i_save: \t%ld %ld\n",timep->tv_sec, timep->tv_nsec);*/ - - pace_pthread_t *pace_thread; - - pace_thread = pace_pthread_getspecific(saved_ID_key); - /* pace_printf("what_ID_did_i_save: \t%ld\n", (long)*pace_thread); */ - return ((long)*pace_thread); -} - -void *thread_routine (void *arg) -{ - long saved_id; - long retrieved_id; - /*int *my_id=(int *)arg;*/ - PACE_UNUSED_ARG (arg); - - /* pace_printf("thread_routine %d\n", *my_id); */ - /*save_the_time(); - what_time_did_i_save();*/ - saved_id = save_the_ID(); - pace_sleep (1); - retrieved_id = what_ID_did_i_save(); - - if (saved_id != retrieved_id) - { - pace_printf ("### ERROR ###: saved id %ld does not equal retrieved - id %ld.\n", saved_id, retrieved_id); - pace_exit (-1); - } - - return (NULL); -} - -int -main (int argc, char *argv[]) -{ - int i; - int *id_arg; - pace_pthread_t threads[NUM_THREADS]; - - PACE_UNUSED_ARG (argc); - PACE_UNUSED_ARG (argv); - - id_arg = (int *) pace_malloc (NUM_THREADS * sizeof(int)); - - /* pace_printf("main : initializing the key\n"); */ - /*pace_pthread_key_create(&saved_time_key, free_time);*/ - pace_pthread_key_create(&saved_ID_key, free_ID); - - /* pace_printf("main : spawning the threads\n"); */ - for (i = 0; i < NUM_THREADS; i++) - { - id_arg[i] = i; - - pace_pthread_create(&(threads[i]), - NULL, - thread_routine, - (void *) &(id_arg[i])); - } - - for (i = 0; i < NUM_THREADS; i++) - { - pace_pthread_join(threads[i], NULL); - /* pace_printf("main : thread %d has finished. \n", i); */ - } - - /* pace_printf("main : goodbye\n"); */ - - return 0; -} diff --git a/PACE/tests/Pthreads_Test.c b/PACE/tests/Pthreads_Test.c deleted file mode 100644 index 7d2710f598b..00000000000 --- a/PACE/tests/Pthreads_Test.c +++ /dev/null @@ -1,110 +0,0 @@ -/* $Id$ -*- C -*- */ - -/* ===================================================================== */ -/* */ -/* = FILENAME */ -/* Pthreads_Test.c */ -/* */ -/* = DESCRIPTION */ -/* Testing the platform for POSIX threads. This is not meant */ -/* to be an exhaustive test at this point but more a sanity check */ -/* that PACE works (at least somewhat) as advertised. */ -/* This program simply creates some threads, joins them, and then */ -/* exits. */ -/* */ -/* This test is largely taken from the O'Reilly _Pthreads */ -/* Programming_ book and accompanying example code. */ -/* */ -/* = AUTHOR */ -/* Joe Hoffert <joeh@cs.wustl.edu> */ -/* */ -/* ===================================================================== */ - -#include "pace/stdio.h" -#include "pace/stdlib.h" -#include "pace/pthread.h" - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -#include "vxworks_stub.c" -#endif /* VXWORKS */ - -const int FUNC1_LOOP_MAX = 5; -const int FUNC2_LOOP_MAX = 50; - -void -func1 (int *pnum_times) -{ - int i; - int j; - int x; - - for (i = 0; i < FUNC1_LOOP_MAX; i++) - { - /*pace_printf("func1\n");*/ - for (j = 0; j < 100000; j++) - x += i; - - (*pnum_times)++; - } -} - -void -func2 (int *pnum_times) -{ - int i; - int j; - int x; - - for (i = 0; i < FUNC2_LOOP_MAX; i++) - { - /*pace_printf("func2\n");*/ - for (j = 0; j < 100; j++) - x += i; - - (*pnum_times)++; - } -} - -void -join_point (int func1_times, int func2_times) -{ - int total; - - total = func1_times + func2_times; - if (total != FUNC1_LOOP_MAX + FUNC2_LOOP_MAX) - { - pace_printf ("### ERROR ###: total iterations should be %d but are %d.\n", - FUNC1_LOOP_MAX + FUNC2_LOOP_MAX, total); - pace_exit (-1); - } -} - -int -main (int argc, char **argv) -{ - /* Test creating threads and joining them. */ - pace_pthread_t thread1; - pace_pthread_t thread2; - int func1_ret = 0; - int func2_ret = 0; - - PACE_UNUSED_ARG (argc); - PACE_UNUSED_ARG (argv); - - pace_pthread_create(&thread1, - NULL, - (void *) func1, - (void *) &func1_ret); - - pace_pthread_create(&thread2, - NULL, - (void *) func2, - (void *) &func2_ret); - - pace_pthread_join(thread1, NULL); - pace_pthread_join(thread2, NULL); - - join_point(func1_ret, func2_ret); - - return 0; -} diff --git a/PACE/tests/README b/PACE/tests/README deleted file mode 100644 index 20d2c164084..00000000000 --- a/PACE/tests/README +++ /dev/null @@ -1,6 +0,0 @@ -Most of the tests are typical of the ACE and TAO tests in that no -output means the test ran successfully. Otherwise, error messages -are output indicating an error. - -Currently the mqueue_test executable requires user input for determing -the kind of test to run. diff --git a/PACE/tests/Stat_Test.c b/PACE/tests/Stat_Test.c deleted file mode 100644 index e221fc0c813..00000000000 --- a/PACE/tests/Stat_Test.c +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ -*- C -*- */ - -/* ===================================================================== */ -/* */ -/* = FILENAME */ -/* Stat_Test.c */ -/* */ -/* = DESCRIPTION */ -/* Testing the platform for POSIX functions typically found in the */ -/* sys/stat.h file (e.g., chmod, mkdir, stat). This is not meant */ -/* to be an exhaustive test at this point but more a sanity check */ -/* that PACE works (at least somewhat) as advertised. */ -/* This program creates a directory (via mkdir), creates a temporary */ -/* file in that directory (via open), modifies the permissions of */ -/* the file (via chmod and fchmod), gets information about the file */ -/* (via stat and fstat), and checks the process' file mode creation */ -/* mask (via umask). The temporary file and directory are then */ -/* closed and deleted. */ -/* */ -/* = AUTHOR */ -/* Joe Hoffert <joeh@cs.wustl.edu> */ -/* */ -/* ===================================================================== */ - -#include "pace/stdio.h" -#include "pace/unistd.h" -#include "pace/fcntl.h" -#include "pace/sys/stat.h" - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -#include "vxworks_stub.c" -#endif /* VXWORKS */ - - -#if PACE_LYNXOS != 0x300 -int -main (int argc, char **argv) -{ - const char * dirname = "./junk"; - const char * failure = "***FAILED***"; - - int fd; - /* - int retval; - char* retval2; - char buffer[256]; - */ - - /* Test creating a directory. */ - /*printf("Starting test...\n"); - if (pace_mkdir(dirname, mode) != 0) - { - pace_printf("pace_mkdir %s\n", failure); - return -1; - } - */ - - fd = pace_open (dirname, - O_WRONLY | O_CREAT, - 0x644); - if (fd == 0) - { - pace_printf("pace_open %s\n", failure); - pace_perror("pace_open"); - return -1; - } - else - { - pace_close (fd); - pace_unlink (dirname); - } - - PACE_UNUSED_ARG (argc); - PACE_UNUSED_ARG (argv); - return 0; -} -#else -int -main (int argc, char **argv) -{ - printf("PACE does not support LynxOS 3.0.0.\n"); -} -#endif /* PACE_LYNXOS == 0x300 */ diff --git a/PACE/tests/Stdio_Test.c b/PACE/tests/Stdio_Test.c deleted file mode 100644 index 469b4f433a8..00000000000 --- a/PACE/tests/Stdio_Test.c +++ /dev/null @@ -1,123 +0,0 @@ -/* $Id$ -*- C -*- */ - -/* ===================================================================== */ -/* */ -/* = FILENAME */ -/* Stdio_Test.c */ -/* */ -/* = DESCRIPTION */ -/* Testing the platform for POSIX standard I/O. This is not meant */ -/* to be an exhaustive test at this point but more a sanity check */ -/* that PACE works (at least somewhat) as advertised. */ -/* This program creates/opens a temporary file, writes to the file, */ -/* reads from the file to make sure it's what was written, and */ -/* then closes/deletes the file. */ -/* */ -/* = AUTHOR */ -/* Joe Hoffert <joeh@cs.wustl.edu> */ -/* */ -/* ===================================================================== */ - -#include "pace/stdio.h" -#include "pace/unistd.h" -#include "pace/string.h" - -const char * filename = "temp"; -const char * mode = "w+"; -const char * string1 = "line 1\n"; -const char * success = "SUCCEEDED"; -const char * failure = "***FAILED***"; - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -#include "vxworks_stub.c" -#endif /* VXWORKS */ - - -#if PACE_LYNXOS != 0x300 -int -main (int argc, char **argv) -{ - /* Test creating/opening a file. */ - PACE_FILE *file; - int retval; - char* retval2; - char buffer[256]; - - file = pace_fopen (filename, - mode); - if (file == 0) - { - printf("pace_fopen %s\n", failure); - return -1; - } - - /* Test writing to a file. */ - retval = pace_fputs (string1, - file); - if (retval == EOF) - { - printf("pace_fputs %s\n", failure); - return -1; - } - - /* Test flushing a file. */ - retval = pace_fflush (file); - if (retval != 0) - { - printf("pace_fflush %s\n", failure); - return -1; - } - - /* Test seeking in a file. */ - retval = pace_fseek (file, - 0, - 0); - if (retval != 0) - { - printf("pace_fseek %s\n", failure); - return -1; - } - - /* Test reading from a file. */ - retval2 = pace_fgets (buffer, - sizeof(buffer), - file); - if (retval2 == 0) - { - printf("pace_fgets %s\n", failure); - return -1; - } - - if (pace_strcmp(buffer, string1) != 0) - { - printf("strcmp of pace_fgets %s\n", failure); - return -1; - } - - /* Test closing a file. */ - retval = pace_fclose (file); - if (retval != 0) - { - printf("pace_fclose %s\n", failure); - return -1; - } - - /* Test removing a file. */ - retval = pace_unlink (filename); - if (retval != 0) - { - printf("pace_unlink %s\n", failure); - return -1; - } - - PACE_UNUSED_ARG (argc); - PACE_UNUSED_ARG (argv); - return 0; -} -#else -int -main (int argc, char **argv) -{ - printf("PACE does not support LynxOS 3.0.0.\n"); -} -#endif /* PACE_LYNXOS == 0x300 */ diff --git a/PACE/tests/mqueue_test.c b/PACE/tests/mqueue_test.c deleted file mode 100644 index b8f55b46d6e..00000000000 --- a/PACE/tests/mqueue_test.c +++ /dev/null @@ -1,134 +0,0 @@ -/* $Id$ */ - -#if PACE_LYNXOS != 0x300 -#include "pace/stdio.h" -#include "pace/fcntl.h" -#include "pace/mqueue.h" -#include "pace/stdlib.h" -#include "pace/signal.h" -#include "pace/string.h" - -#if defined (PACE_VXWORKS) && PACE_VXWORKS != 0 -#include "vxworks_stub.c" -#endif /* VXWORKS */ - -/* Most of this code is borowed from Konstantin Knizhnik <http://www.ispras.ru/~knizhnik/posix1b/> */ - -pace_mqd_t mqdes; - -void -msg_handler (int handler_arg) -{ - char buf[1024]; - unsigned int priority; - int len = pace_mq_receive(mqdes, buf, sizeof buf, &priority); - - PACE_UNUSED_ARG (handler_arg); - - if (len < 0) - { - perror("mq_receive"); - } - pace_printf("\nReceive message with priority %d: %s\n", priority, buf); -} - -#define QUEUE_NAME "/testmsg1" - -int -main (int argc, char** argv) -{ -#if PACE_LYNXOS > 0 - pace_printf ("mqueue_test not supported on LynxOS.\n"); - PACE_UNUSED_ARG (argc); - PACE_UNUSED_ARG (argv); - return EXIT_SUCCESS; -#else /* ! PACE_LYNXOS */ - char buf[1024]; - int choice, len; - unsigned int priority; - pace_sigevent notification; - static pace_sigaction_s sa; - int one = 1; - - mqdes = pace_mq_open(QUEUE_NAME, O_CREAT | O_RDWR, 0777, 0); - if (mqdes == (pace_mqd_t)-1) - { - perror("mq_open"); - return EXIT_FAILURE; - } - - notification.sigev_notify = SIGEV_SIGNAL; - notification.sigev_signo = SIGUSR1; - - sa.sa_handler = msg_handler; - sa.sa_flags = SA_RESTART; - pace_sigaction(SIGUSR1, &sa, NULL); - - while (one) - { - printf("\t1. Send\n" - "\t2. Asynchronouse receive\n" - "\t3. Synchronouse receive\n" - "\t4. Close queue and exit\n" - "\t5. Remove queue and exit\n" - "> "); - if (!pace_fgets(buf, sizeof buf, stdin)) - { - return EXIT_FAILURE; - } - if (pace_sscanf(buf, "%d", &choice) != 1) - { - pace_printf("Please select 1..5\n"); - continue; - } - switch (choice) - { - case 1: - do - { - pace_printf("Message priority: "); - pace_fgets(buf, sizeof buf, stdin); - } while (pace_sscanf(buf, "%d", &priority) != 1); - pace_printf("Message to send: "); - pace_fgets(buf, sizeof buf, stdin); - if (pace_mq_send(mqdes, buf, pace_strlen(buf)+1, priority) == -1) - { - perror("mq_send"); - return EXIT_FAILURE; - } - break; - case 2: - pace_mq_notify(mqdes, ¬ification); - pace_printf("Waiting for notifications...\n"); - break; - case 3: - len = pace_mq_receive(mqdes, buf, sizeof buf, &priority); - if (len < 0) - { - perror("mq_receive"); - } - pace_printf("Receive message with priority %d: %s\n", priority, buf); - break; - case 4: - pace_mq_close(mqdes); - return EXIT_SUCCESS; - case 5: - pace_mq_close(mqdes); - pace_mq_unlink(QUEUE_NAME); - return EXIT_SUCCESS; - default: - pace_printf("Please select 1..5\n"); - } - } - PACE_UNUSED_ARG (argc); - PACE_UNUSED_ARG (argv); - return EXIT_SUCCESS; -#endif /* ! PACE_LYNXOS */ -} -#else -int -main (int argc, char **argv) -{ - printf("PACE does not support LynxOS 3.0.0.\n"); -} -#endif /* PACE_LYNXOS == 0x300 */ diff --git a/PACE/tests/test_stdio.dsp b/PACE/tests/test_stdio.dsp deleted file mode 100644 index 198cfb45f4f..00000000000 --- a/PACE/tests/test_stdio.dsp +++ /dev/null @@ -1,162 +0,0 @@ -# Microsoft Developer Studio Project File - Name="test_stdio" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_stdio - Win32 Static Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_stdio.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_stdio.mak" CFG="test_stdio - Win32 Static Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_stdio - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_stdio - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_stdio - Win32 Static Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_stdio - Win32 Static Release" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_stdio - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "PACE_HAS_ALL_POSIX_FUNCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 pace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../pace/win32"
-
-!ELSEIF "$(CFG)" == "test_stdio - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".." /D "_DEBUG" /D "PACE_HAS_ALL_POSIX_FUNCS" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 paced.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../pace/win32"
-
-!ELSEIF "$(CFG)" == "test_stdio - Win32 Static Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Static_Debug"
-# PROP BASE Intermediate_Dir "Static_Debug"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Static_Debug"
-# PROP Intermediate_Dir "Static_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /I ".." /D "_DEBUG" /D "PACE_HAS_ALL_POSIX_FUNCS" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".." /D "_DEBUG" /D "PACE_HAS_ALL_POSIX_FUNCS" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 paced.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../pace/win32"
-# ADD LINK32 pacesd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../pace/win32"
-
-!ELSEIF "$(CFG)" == "test_stdio - Win32 Static Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Static_Release"
-# PROP BASE Intermediate_Dir "Static_Release"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Static_Release"
-# PROP Intermediate_Dir "Static_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /I ".." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "PACE_HAS_ALL_POSIX_FUNCS" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "PACE_HAS_ALL_POSIX_FUNCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 pace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../pace/win32"
-# ADD LINK32 paces.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../pace/win32"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_stdio - Win32 Release"
-# Name "test_stdio - Win32 Debug"
-# Name "test_stdio - Win32 Static Debug"
-# Name "test_stdio - Win32 Static Release"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Stdio_Test.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/PACE/tests/tests.dsw b/PACE/tests/tests.dsw deleted file mode 100644 index 3b385f17556..00000000000 --- a/PACE/tests/tests.dsw +++ /dev/null @@ -1,59 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "PACE DLL"=..\pace\win32\pace_dll.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "PACE LIB"=..\pace\win32\pace_lib.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "test_stdio"=.\test_stdio.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name PACE DLL
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name PACE LIB
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/PACE/tests/vxworks_stub.c b/PACE/tests/vxworks_stub.c deleted file mode 100644 index 7ec9bf3f884..00000000000 --- a/PACE/tests/vxworks_stub.c +++ /dev/null @@ -1,109 +0,0 @@ -/* $Id$ -*- C -*- */ - -/* ===================================================================== */ -/* */ -/* = FILENAME */ -/* vxworks_stub.c */ -/* */ -/* = DESCRIPTION */ -/* The file includes the special machinations that are needed to */ -/* kick off a C program in VxWorks. Every test run on VxWorks needs */ -/* to have this so it is put into this common file. */ -/* */ -/* = AUTHOR */ -/* Joe Hoffert <joeh@cs.wustl.edu> */ -/* */ -/* ===================================================================== */ - -# define main post_pace_main -# include /**/ <usrLib.h> /* for ::sp() */ -# include /**/ "pace/pthread.h" - -int post_pace_main(); - -/* This global function can be used from the VxWorks shell to pass - * arguments to a C main () function. - * - * usage: -> spa main, "arg1", "arg2" - * - * All arguments must be quoted, even numbers. - */ -int -spa (FUNCPTR entry, ...) -{ - const unsigned int MAX_ARGS = 10; - char *argv[MAX_ARGS]; - va_list pvar; - unsigned int argc; - int ret; - - /* Hardcode a program name because the real one isn't available - * through the VxWorks shell. - */ - argv[0] = "pace_main"; - - /* Peel off arguments to spa () and put into argv. va_arg () isn't - * necessarily supposed to return 0 when done, though since the - * VxWorks shell uses a fixed number (10) of arguments, it might 0 - * the unused ones. This function could be used to increase that - * limit, but then it couldn't depend on the trailing 0. So, the - * number of arguments would have to be passed. - */ - va_start (pvar, entry); - - for (argc = 1; argc <= MAX_ARGS; ++argc) - { - argv[argc] = va_arg (pvar, char *); - - if (argv[argc] == 0) - break; - } - - if (argc > MAX_ARGS && argv[argc-1] != 0) - { - /* try to read another arg, and warn user if the limit was exceeded */ - if (va_arg (pvar, char *) != 0) - pace_fprintf (stderr, "spa(): number of arguments limited to %d\n", - MAX_ARGS); - } - else - { - /* fill unused argv slots with 0 to get rid of leftovers - * from previous invocations - */ - unsigned int i; - for (i = argc; i <= MAX_ARGS; ++i) - argv[i] = 0; - } - - /* The hard-coded options are what ::sp () uses, except for the - * larger stack size (instead of ::sp ()'s 20000). - */ - ret = taskSpawn (argv[0], /* task name */ - 100, /* task priority */ - VX_FP_TASK, /* task options */ - PTHREAD_DEFAULT_STACK_SIZE, /* stack size */ - entry, /* entry point */ - argc, /* first argument to main () */ - (int) argv, /* second argument to main () */ - 0, 0, 0, 0, 0, 0, 0, 0); - va_end (pvar); - - /* taskSpawn () returns the taskID on success: return 0 instead if - * successful - */ - return ret > 0 ? 0 : ret; -} - -int -pace_main(int argc, char* argv[]) -{ - /* Setup information for VxWorks emulation */ - if (pacevx_vxworks_init() == ERROR) - return ERROR; - - /* Call the "normal" main function now that we've done - * our bookkeeping. - */ - return post_pace_main(argc, argv); -} |