Index: testsuites/psxtests/ChangeLog
===================================================================
--- testsuites/psxtests/ChangeLog	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/ChangeLog	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -1,2 +1,9 @@
+2009-09-13	Joel Sherrill <joel.sherrill@oarcorp.com>
+
+	* psxclock/init.c, psxclock/psxclock.scn, psxenosys/init.c,
+	psxenosys/psxenosys.scn, psxsignal03/Makefile.am, psxsignal03/init.c,
+	psxsignal04/Makefile.am: Move test cases which needed to be executed
+	when POSIX is disabled to psxclock so they will be.
+
 2009-09-13	Joel Sherrill <joel.sherrill@oarcorp.com>
 
Index: testsuites/psxtests/psxclock/init.c
===================================================================
--- testsuites/psxtests/psxclock/init.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/psxclock/init.c	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -14,4 +14,14 @@
 #include <errno.h>
 
+void check_enosys(int status);
+
+void check_enosys(int status)
+{
+  if ( (status == -1) && (errno == ENOSYS) ) 
+    return;
+  puts( "ERROR -- did not return ENOSYS as expected" );
+  rtems_test_exit(0);
+}
+
 rtems_task Init(
   rtems_task_argument argument
@@ -20,5 +30,5 @@
   struct timespec tv;
   struct timespec tr;
-  int             status;
+  int             sc;
   int             priority;
   pthread_t       thread_id;
@@ -36,16 +46,16 @@
 
   puts( "Init: clock_gettime - EINVAL (NULL timespec)" );
-  status = clock_gettime( CLOCK_REALTIME, NULL );
-  rtems_test_assert( status == -1 );
+  sc = clock_gettime( CLOCK_REALTIME, NULL );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
   puts( "Init: clock_gettime - EINVAL (invalid clockid)" );
-  status = clock_gettime( (clockid_t)-1, &tv );
-  rtems_test_assert( status == -1 );
+  sc = clock_gettime( (clockid_t)-1, &tv );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
   puts( "Init: clock_settime - EINVAL (invalid clockid)" );
-  status = clock_settime( (clockid_t)-1, &tv );
-  rtems_test_assert( status == -1 );
+  sc = clock_settime( (clockid_t)-1, &tv );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
@@ -55,6 +65,6 @@
   printf( ctime( &tv.tv_sec ) );
   puts( "Init: clock_settime - before 1988 EINVAL" );
-  status = clock_settime( CLOCK_REALTIME, &tv );
-  rtems_test_assert( status == -1 );
+  sc = clock_settime( CLOCK_REALTIME, &tv );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
@@ -62,17 +72,17 @@
 
   puts( "Init: clock_getres - EINVAL (invalid clockid)" );
-  status = clock_getres( (clockid_t) -1, &tv );
-  rtems_test_assert( status == -1 );
+  sc = clock_getres( (clockid_t) -1, &tv );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
   puts( "Init: clock_getres - EINVAL (NULL resolution)" );
-  status = clock_getres( CLOCK_REALTIME, NULL );
-  rtems_test_assert( status == -1 );
+  sc = clock_getres( CLOCK_REALTIME, NULL );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
   puts( "Init: clock_getres - SUCCESSFUL" );
-  status = clock_getres( CLOCK_REALTIME, &tv );
+  sc = clock_getres( CLOCK_REALTIME, &tv );
   printf( "Init: resolution = sec (%ld), nsec (%ld)\n", tv.tv_sec, tv.tv_nsec );
-  rtems_test_assert( !status );
+  rtems_test_assert( !sc );
 
   /* set the time of day, and print our buffer in multiple ways */
@@ -89,6 +99,6 @@
   printf( asctime( &tm ) );
   puts( "Init: clock_settime - SUCCESSFUL" );
-  status = clock_settime( CLOCK_REALTIME, &tv );
-  rtems_test_assert( !status );
+  sc = clock_settime( CLOCK_REALTIME, &tv );
+  rtems_test_assert( !sc );
 
   printf( asctime( &tm ) );
@@ -101,10 +111,10 @@
   
   /* print new times to make sure it has changed and we can get the realtime */
-  status = clock_gettime( CLOCK_PROCESS_CPUTIME, &tv );
-  rtems_test_assert( !status );
+  sc = clock_gettime( CLOCK_PROCESS_CPUTIME, &tv );
+  rtems_test_assert( !sc );
   printf("Time since boot: (%d, %d)\n", tv.tv_sec,tv.tv_nsec );
 
-  status = clock_gettime( CLOCK_REALTIME, &tv );
-  rtems_test_assert( !status );
+  sc = clock_gettime( CLOCK_REALTIME, &tv );
+  rtems_test_assert( !sc );
 
   printf( ctime( &tv.tv_sec ) );
@@ -127,6 +137,6 @@
   empty_line();
   puts( "Init: nanosleep - EINVAL (NULL time)" );
-  status = nanosleep ( NULL, &tr );
-  rtems_test_assert( status == -1 );
+  sc = nanosleep ( NULL, &tr );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
@@ -134,6 +144,6 @@
   tv.tv_nsec = TOD_NANOSECONDS_PER_SECOND * 2;
   puts( "Init: nanosleep - EINVAL (too many nanoseconds)" );
-  status = nanosleep ( &tv, &tr );
-  rtems_test_assert( status == -1 );
+  sc = nanosleep ( &tv, &tr );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
@@ -142,6 +152,6 @@
   tv.tv_nsec = 0;
   puts( "Init: nanosleep - negative seconds small delay " );
-  status = nanosleep ( &tv, &tr );
-  rtems_test_assert( status == -1 );
+  sc = nanosleep ( &tv, &tr );
+  rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EINVAL );
 
@@ -152,12 +162,12 @@
 
   puts( "Init: nanosleep - yield with remaining" );
-  status = nanosleep ( &tv, &tr );
-  rtems_test_assert( !status );
+  sc = nanosleep ( &tv, &tr );
+  rtems_test_assert( !sc );
   rtems_test_assert( !tr.tv_sec );
   rtems_test_assert( !tr.tv_nsec );
 
   puts( "Init: nanosleep - yield with NULL time remaining" );
-  status = nanosleep ( &tv, NULL );
-  rtems_test_assert( !status );
+  sc = nanosleep ( &tv, NULL );
+  rtems_test_assert( !sc );
   rtems_test_assert( !tr.tv_sec );
   rtems_test_assert( !tr.tv_nsec );
@@ -169,10 +179,10 @@
 
   puts( "Init: nanosleep - 1.05 seconds" );
-  status = nanosleep ( &tv, &tr );
-  rtems_test_assert( !status );
+  sc = nanosleep ( &tv, &tr );
+  rtems_test_assert( !sc );
 
   /* print the current real time again */
-  status = clock_gettime( CLOCK_REALTIME, &tv );
-  rtems_test_assert( !status );
+  sc = clock_gettime( CLOCK_REALTIME, &tv );
+  rtems_test_assert( !sc );
   printf( ctime( &tv.tv_sec ) );
 
@@ -187,7 +197,35 @@
   
   /* print the current real time again */
-  status = clock_gettime( CLOCK_REALTIME, &tv );
-  rtems_test_assert( !status );
-  printf( ctime( &tv.tv_sec ) );
+  sc = clock_gettime( CLOCK_REALTIME, &tv );
+  rtems_test_assert( !sc );
+  printf( ctime( &tv.tv_sec ) );
+
+  puts( "" );
+  puts( "clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
+  #if defined(_POSIX_THREAD_CPUTIME)
+    {
+      struct timespec tp;
+      sc = clock_gettime( CLOCK_THREAD_CPUTIME, &tp );
+      check_enosys( sc );
+    }
+  #endif
+
+  puts( "clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS" );
+  #if defined(_POSIX_CPUTIME)
+    {
+      struct timespec tp;
+      sc = clock_settime( CLOCK_PROCESS_CPUTIME, &tp );
+      check_enosys( sc );
+    }
+  #endif
+
+  puts( "clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
+  #if defined(_POSIX_THREAD_CPUTIME)
+    {
+      struct timespec tp;
+      sc = clock_settime( CLOCK_THREAD_CPUTIME, &tp );
+      check_enosys( sc );
+    }
+  #endif
 
   puts( "*** END OF POSIX CLOCK TEST ***" );
Index: testsuites/psxtests/psxclock/psxclock.scn
===================================================================
--- testsuites/psxtests/psxclock/psxclock.scn	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/psxclock/psxclock.scn	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -29,3 +29,6 @@
 Init: usleep - 1.35 seconds
 Fri May 24 11:05:07 1996
+clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS
+clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS
+clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS
 *** END OF POSIX CLOCK TEST ***
Index: testsuites/psxtests/psxenosys/init.c
===================================================================
--- testsuites/psxtests/psxenosys/init.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/psxenosys/init.c	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -83,31 +83,4 @@
   check_enosys( sc );
 
-  puts( "clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
-  #if defined(_POSIX_THREAD_CPUTIME)
-    {
-      struct timespec tp;
-      sc = clock_gettime( CLOCK_THREAD_CPUTIME, &tp );
-      check_enosys( sc );
-    }
-  #endif
-
-  puts( "clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS" );
-  #if defined(_POSIX_CPUTIME)
-    {
-      struct timespec tp;
-      sc = clock_settime( CLOCK_PROCESS_CPUTIME, &tp );
-      check_enosys( sc );
-    }
-  #endif
-
-  puts( "clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
-  #if defined(_POSIX_THREAD_CPUTIME)
-    {
-      struct timespec tp;
-      sc = clock_settime( CLOCK_THREAD_CPUTIME, &tp );
-      check_enosys( sc );
-    }
-  #endif
-
   puts( "devctl -- ENOSYS" );
   sc = devctl( 0, NULL, 0, NULL );
Index: testsuites/psxtests/psxenosys/psxenosys.scn
===================================================================
--- testsuites/psxtests/psxenosys/psxenosys.scn	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/psxenosys/psxenosys.scn	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -11,7 +11,4 @@
 clock_getenable_attr -- ENOSYS
 clock_setenable_attr -- ENOSYS
-clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS
-clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS
-clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS
 devctl -- ENOSYS
 execl -- ENOSYS
Index: testsuites/psxtests/psxsignal03/Makefile.am
===================================================================
--- testsuites/psxtests/psxsignal03/Makefile.am	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/psxsignal03/Makefile.am	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -19,5 +19,5 @@
 AM_CPPFLAGS += -I$(top_srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-AM_CPPFLAGS += -DUSE_USER_SIGNALS
+AM_CPPFLAGS += -DUSE_USER_SIGNALS_PROCESS
 
 LINK_OBJS = $(psxsignal03_OBJECTS) $(psxsignal03_LDADD)
Index: testsuites/psxtests/psxsignal03/init.c
===================================================================
--- testsuites/psxtests/psxsignal03/init.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/psxsignal03/init.c	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -10,15 +10,35 @@
  */
 
-#if defined(USE_USER_SIGNALS)
+#if defined(USE_USER_SIGNALS_PROCESS)
   #define TEST_NAME                "03"
-  #define TEST_STRING              "User Signals"
+  #define TEST_STRING              "User Signals to Process"
   #define SIGNAL_ONE               SIGUSR1
   #define SIGNAL_TWO               SIGUSR2
-
-#elif defined(USE_REAL_TIME_SIGNALS)
+  #define SEND_SIGNAL(_sig)        kill( getpid(), _sig )
+  #define TO_PROCESS
+
+#elif defined(USE_REAL_TIME_SIGNALS_PROCESS)
   #define TEST_NAME                "04"
-  #define TEST_STRING              "Real-Time Signals"
+  #define TEST_STRING              "Real-Time Signals to Process"
   #define SIGNAL_ONE               SIGRTMIN
   #define SIGNAL_TWO               SIGRTMAX
+  #define SEND_SIGNAL(_sig)        kill( getpid(), _sig )
+  #define TO_PROCESS
+
+#elif defined(USE_USER_SIGNALS_THREAD)
+  #define TEST_NAME                "05"
+  #define TEST_STRING              "User Signals to Thread"
+  #define SIGNAL_ONE               SIGUSR1
+  #define SIGNAL_TWO               SIGUSR2
+  #define SEND_SIGNAL(_sig)        pthread_kill( id, _sig )
+  #define TO_THREAD
+
+#elif defined(USE_REAL_TIME_SIGNALS_THREAD)
+  #define TEST_NAME                "05"
+  #define TEST_STRING              "Real-Time Signals to Thread"
+  #define SIGNAL_ONE               SIGRTMIN
+  #define SIGNAL_TWO               SIGRTMAX
+  #define SEND_SIGNAL(_sig)        pthread_kill( id, _sig )
+  #define TO_THREAD
 
 #else
@@ -155,16 +175,18 @@
   printf( "Init - sending %s - deliver to one thread\n",
           signal_name(SIGNAL_TWO));
-  sc =  kill( getpid(), SIGNAL_TWO );
+  sc =  SEND_SIGNAL( SIGNAL_TWO );
   assert( !sc );
 
   printf( "Init - sending %s - deliver to other thread\n",
           signal_name(SIGNAL_TWO));
-  sc =  kill( getpid(), SIGNAL_TWO );
-  assert( !sc );
-
-  printf( "Init - sending %s - expect EAGAIN\n", signal_name(SIGNAL_TWO) );
-  sc =  kill( getpid(), SIGNAL_TWO );
-  assert( sc == -1 );
-  assert( errno == EAGAIN );
+  sc =  SEND_SIGNAL( SIGNAL_TWO );
+  assert( !sc );
+
+  #if defined(TO_PROCESS)
+    printf( "Init - sending %s - expect EAGAIN\n", signal_name(SIGNAL_TWO) );
+    sc =  SEND_SIGNAL( SIGNAL_TWO );
+    assert( sc == -1 );
+    assert( errno == EAGAIN );
+  #endif
 
   puts( "Init - sleep - let thread report if it unblocked - OK" );
Index: testsuites/psxtests/psxsignal04/Makefile.am
===================================================================
--- testsuites/psxtests/psxsignal04/Makefile.am	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ testsuites/psxtests/psxsignal04/Makefile.am	(revision 1e2d7510363b4099315c9ec0dd541bf3c3764297)
@@ -19,5 +19,5 @@
 AM_CPPFLAGS += -I$(top_srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-AM_CPPFLAGS += -DUSE_REAL_TIME_SIGNALS
+AM_CPPFLAGS += -DUSE_REAL_TIME_SIGNALS_PROCESS
 
 LINK_OBJS = $(psxsignal04_OBJECTS) $(psxsignal04_LDADD)
