summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-13 20:36:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-13 20:36:36 +0000
commit88271c3308aef5db023687bf32ea30c60becc080 (patch)
treefd443cbf2d3209e8a1499c516773eb317a29624b /testsuites
parent2009-09-13 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-88271c3308aef5db023687bf32ea30c60becc080.tar.bz2
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, psx01/init.c, psx01/psx01.scn: Add new test to exercise clock and delay services enabled when POSIX threads are disabled. This is split from psx01. POSIX test suite now enabled when POSIX threads are disabled so only enable tests which are appropriate. * psxclock/.cvsignore, psxclock/Makefile.am, psxclock/init.c, psxclock/psxclock.doc, psxclock/psxclock.scn: New files.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/ChangeLog10
-rw-r--r--testsuites/psxtests/Makefile.am10
-rw-r--r--testsuites/psxtests/configure.ac4
-rw-r--r--testsuites/psxtests/psx01/init.c164
-rw-r--r--testsuites/psxtests/psx01/psx01.scn29
-rw-r--r--testsuites/psxtests/psxclock/.cvsignore2
-rw-r--r--testsuites/psxtests/psxclock/Makefile.am29
-rw-r--r--testsuites/psxtests/psxclock/init.c206
-rw-r--r--testsuites/psxtests/psxclock/psxclock.doc28
-rw-r--r--testsuites/psxtests/psxclock/psxclock.scn31
10 files changed, 319 insertions, 194 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog
index ae63798660..20fa8762eb 100644
--- a/testsuites/psxtests/ChangeLog
+++ b/testsuites/psxtests/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, configure.ac, psx01/init.c, psx01/psx01.scn: Add new
+ test to exercise clock and delay services enabled when POSIX threads
+ are disabled. This is split from psx01. POSIX test suite now enabled
+ when POSIX threads are disabled so only enable tests which are
+ appropriate.
+ * psxclock/.cvsignore, psxclock/Makefile.am, psxclock/init.c,
+ psxclock/psxclock.doc, psxclock/psxclock.scn: New files.
+
2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* psx09/init.c, psx09/psx09.scn: Correct test following decision of
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 96533d5632..388df43c27 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -4,7 +4,9 @@
ACLOCAL_AMFLAGS = -I ../aclocal
-SUBDIRS = psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
+SUBDIRS = psxclock
+if HAS_POSIX
+SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
psx10 psx11 psx12 psx13 psx14 psxautoinit01 psxautoinit02 psxbarrier01 \
psxcancel psxcleanup psxcond01 psxenosys psxkey01 psxkey02 psxkey03 \
psxitimer psxmsgq01 psxmsgq02 psxmsgq03 psxmsgq04 psxmutexattr01 psxobj01 \
@@ -12,15 +14,21 @@ SUBDIRS = psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
psxsignal05 psxspin01 psxspin02 psxsysconf psxtime psxtimer01 psxtimer02 \
psxualarm psxfatal01 psxfatal02 \
psxintrcritical01 psxstack01
+endif
+if HAS_POSIX
## File IO tests
SUBDIRS += psxfile01 psxreaddir psxstat psxmount psx13 psxchroot01
+endif
+
## Until sys/uio.h is moved to libcsupport, we have to have networking
## enabled to support readv and writev. Hopefully this is a temporary
## situation.
if HAS_NETWORKING
+if HAS_POSIX
SUBDIRS += psxrdwrv
endif
+endif
DIST_SUBDIRS = $(SUBDIRS) psxfatal_support
EXTRA_DIST = psxfatal_support/init.c psxfatal_support/system.h
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index b29992d2d7..8ce7d1fc8e 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -24,6 +24,9 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
+RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
+AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes")
+
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
psx01/Makefile
@@ -46,6 +49,7 @@ psxbarrier01/Makefile
psxcancel/Makefile
psxchroot01/Makefile
psxcleanup/Makefile
+psxclock/Makefile
psxcond01/Makefile
psxenosys/Makefile
psxfatal01/Makefile
diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c
index 0f44bd193f..c548dc64a6 100644
--- a/testsuites/psxtests/psx01/init.c
+++ b/testsuites/psxtests/psx01/init.c
@@ -23,17 +23,11 @@ void *POSIX_Init(
int status;
int priority;
pthread_t thread_id;
- time_t seconds;
- time_t seconds1;
- unsigned int remaining;
struct tm tm;
struct utsname uts;
- useconds_t useconds;
puts( "\n\n*** POSIX TEST 1 ***" );
- tm_build_time( &tm, TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
/* print some system information */
puts( "Init: uname - EFAULT (invalid uts pointer argument)" );
@@ -50,164 +44,6 @@ void *POSIX_Init(
printf( "Init: uts.machine: %s\n", uts.machine );
puts("");
- /* error cases in clock_gettime and clock_settime */
-
- puts( "Init: clock_gettime - EINVAL (NULL timespec)" );
- status = clock_gettime( CLOCK_REALTIME, NULL );
- rtems_test_assert( status == -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 );
- rtems_test_assert( errno == EINVAL );
-
- puts( "Init: clock_settime - EINVAL (invalid clockid)" );
- status = clock_settime( (clockid_t)-1, &tv );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
-
- /* way back near the dawn of time :D */
- tv.tv_sec = 1;
- tv.tv_nsec = 0;
- printf( ctime( &tv.tv_sec ) );
- puts( "Init: clock_settime - before 1988 EINVAL" );
- status = clock_settime( CLOCK_REALTIME, &tv );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
-
- /* exercise clock_getres */
-
- puts( "Init: clock_getres - EINVAL (invalid clockid)" );
- status = clock_getres( (clockid_t) -1, &tv );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
-
- puts( "Init: clock_getres - EINVAL (NULL resolution)" );
- status = clock_getres( CLOCK_REALTIME, NULL );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
-
- puts( "Init: clock_getres - SUCCESSFUL" );
- status = clock_getres( CLOCK_REALTIME, &tv );
- printf( "Init: resolution = sec (%ld), nsec (%ld)\n", tv.tv_sec, tv.tv_nsec );
- rtems_test_assert( !status );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- tv.tv_sec = mktime( &tm );
- rtems_test_assert( tv.tv_sec != -1 );
-
- tv.tv_nsec = 0;
-
- /* now set the time of day */
-
- empty_line();
-
- printf( asctime( &tm ) );
- puts( "Init: clock_settime - SUCCESSFUL" );
- status = clock_settime( CLOCK_REALTIME, &tv );
- rtems_test_assert( !status );
-
- printf( asctime( &tm ) );
- printf( ctime( &tv.tv_sec ) );
-
- /* use sleep to delay */
-
- remaining = sleep( 3 );
- rtems_test_assert( !remaining );
-
- /* 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 );
- printf("Time since boot: (%d, %d)\n", tv.tv_sec,tv.tv_nsec );
-
- status = clock_gettime( CLOCK_REALTIME, &tv );
- rtems_test_assert( !status );
-
- printf( ctime( &tv.tv_sec ) );
-
- seconds = time( NULL );
- printf( ctime( &seconds ) );
-
- /* just to have the value copied out through the parameter */
-
- seconds = time( &seconds1 );
- rtems_test_assert( seconds == seconds1 );
-
- /* check the time remaining */
-
- printf( "Init: seconds remaining (%d)\n", (int)remaining );
- rtems_test_assert( !remaining );
-
- /* error cases in nanosleep */
-
- empty_line();
- puts( "Init: nanosleep - EINVAL (NULL time)" );
- status = nanosleep ( NULL, &tr );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
-
- tv.tv_sec = 0;
- tv.tv_nsec = TOD_NANOSECONDS_PER_SECOND * 2;
- puts( "Init: nanosleep - EINVAL (too many nanoseconds)" );
- status = nanosleep ( &tv, &tr );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
-
- /* this is actually a small delay or yield */
- tv.tv_sec = -1;
- tv.tv_nsec = 0;
- puts( "Init: nanosleep - negative seconds small delay " );
- status = nanosleep ( &tv, &tr );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
-
- /* use nanosleep to yield */
-
- tv.tv_sec = 0;
- tv.tv_nsec = 0;
-
- puts( "Init: nanosleep - yield with remaining" );
- status = nanosleep ( &tv, &tr );
- rtems_test_assert( !status );
- 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 );
- rtems_test_assert( !tr.tv_sec );
- rtems_test_assert( !tr.tv_nsec );
-
- /* use nanosleep to delay */
-
- tv.tv_sec = 3;
- tv.tv_nsec = 500000;
-
- puts( "Init: nanosleep - 1.05 seconds" );
- status = nanosleep ( &tv, &tr );
- rtems_test_assert( !status );
-
- /* print the current real time again */
- status = clock_gettime( CLOCK_REALTIME, &tv );
- rtems_test_assert( !status );
- printf( ctime( &tv.tv_sec ) );
-
- /* check the time remaining */
-
- printf( "Init: sec (%ld), nsec (%ld) remaining\n", tr.tv_sec, tr.tv_nsec );
- rtems_test_assert( !tr.tv_sec && !tr.tv_nsec );
-
- puts( "Init: usleep - 1.35 seconds" );
- useconds = usleep ( 1350000 );
- rtems_test_assert( useconds < 1350000 );
-
- /* print the current real time again */
- status = clock_gettime( CLOCK_REALTIME, &tv );
- rtems_test_assert( !status );
- printf( ctime( &tv.tv_sec ) );
-
/* get id of this thread */
Init_id = pthread_self();
diff --git a/testsuites/psxtests/psx01/psx01.scn b/testsuites/psxtests/psx01/psx01.scn
index e740fdb072..b187dc95c4 100644
--- a/testsuites/psxtests/psx01/psx01.scn
+++ b/testsuites/psxtests/psx01/psx01.scn
@@ -8,35 +8,6 @@ Init: uts.release: 4.9.99.0
Init: uts.version:
Init: uts.machine: ARM/ARMv4T
-Init: clock_gettime - EINVAL (NULL timespec)
-Init: clock_gettime - EINVAL (invalid clockid)
-Init: clock_settime - EINVAL (invalid clockid)
-Thu Jan 1 00:00:01 1970
-Init: clock_settime - before 1988 EINVAL
-Init: clock_getres - EINVAL (invalid clockid)
-Init: clock_getres - EINVAL (NULL resolution)
-Init: clock_getres - SUCCESSFUL
-Init: resolution = sec (0), nsec (10000000)
-
-Fri May 24 11:05:00 1996
-Init: clock_settime - SUCCESSFUL
-Fri May 24 11:05:00 1996
-Fri May 24 11:05:00 1996
-Time since boot: (3, 20000000)
-Fri May 24 11:05:03 1996
-Fri May 24 11:05:03 1996
-Init: seconds remaining (0)
-
-Init: nanosleep - EINVAL (NULL time)
-Init: nanosleep - EINVAL (too many nanoseconds)
-Init: nanosleep - negative seconds small delay
-Init: nanosleep - yield with remaining
-Init: nanosleep - yield with NULL time remaining
-Init: nanosleep - 1.05 seconds
-Fri May 24 11:05:06 1996
-Init: sec (0), nsec (0) remaining
-Init: usleep - 1.35 seconds
-Fri May 24 11:05:07 1996
Init: ID is 0x0b010001
Init: sched_get_priority_min (SCHED_FIFO) -- 1
Init: sched_get_priority_min -- EINVAL (invalid policy)
diff --git a/testsuites/psxtests/psxclock/.cvsignore b/testsuites/psxtests/psxclock/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/psxtests/psxclock/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/psxtests/psxclock/Makefile.am b/testsuites/psxtests/psxclock/Makefile.am
new file mode 100644
index 0000000000..e456cb76dc
--- /dev/null
+++ b/testsuites/psxtests/psxclock/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxclock
+psxclock_SOURCES = init.c ../include/pmacros.h
+
+dist_rtems_tests_DATA = psxclock.scn
+dist_rtems_tests_DATA += psxclock.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+psxclock_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxclock_OBJECTS) $(psxclock_LDADD)
+LINK_LIBS = $(psxclock_LDLIBS)
+
+psxclock$(EXEEXT): $(psxclock_OBJECTS) $(psxclock_DEPENDENCIES)
+ @rm -f psxclock$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/psxtests/psxclock/init.c b/testsuites/psxtests/psxclock/init.c
new file mode 100644
index 0000000000..9f8c5671d9
--- /dev/null
+++ b/testsuites/psxtests/psxclock/init.c
@@ -0,0 +1,206 @@
+/*
+ * COPYRIGHT (c) 1989-2009.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <pmacros.h>
+#include <time.h>
+#include <errno.h>
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ struct timespec tv;
+ struct timespec tr;
+ int status;
+ int priority;
+ pthread_t thread_id;
+ time_t seconds;
+ time_t seconds1;
+ unsigned int remaining;
+ struct tm tm;
+ useconds_t useconds;
+
+ puts( "\n\n*** POSIX CLOCK TEST ***" );
+
+ tm_build_time( &tm, TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
+
+ /* error cases in clock_gettime and clock_settime */
+
+ puts( "Init: clock_gettime - EINVAL (NULL timespec)" );
+ status = clock_gettime( CLOCK_REALTIME, NULL );
+ rtems_test_assert( status == -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 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "Init: clock_settime - EINVAL (invalid clockid)" );
+ status = clock_settime( (clockid_t)-1, &tv );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ /* way back near the dawn of time :D */
+ tv.tv_sec = 1;
+ tv.tv_nsec = 0;
+ printf( ctime( &tv.tv_sec ) );
+ puts( "Init: clock_settime - before 1988 EINVAL" );
+ status = clock_settime( CLOCK_REALTIME, &tv );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ /* exercise clock_getres */
+
+ puts( "Init: clock_getres - EINVAL (invalid clockid)" );
+ status = clock_getres( (clockid_t) -1, &tv );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "Init: clock_getres - EINVAL (NULL resolution)" );
+ status = clock_getres( CLOCK_REALTIME, NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ puts( "Init: clock_getres - SUCCESSFUL" );
+ status = clock_getres( CLOCK_REALTIME, &tv );
+ printf( "Init: resolution = sec (%ld), nsec (%ld)\n", tv.tv_sec, tv.tv_nsec );
+ rtems_test_assert( !status );
+
+ /* set the time of day, and print our buffer in multiple ways */
+
+ tv.tv_sec = mktime( &tm );
+ rtems_test_assert( tv.tv_sec != -1 );
+
+ tv.tv_nsec = 0;
+
+ /* now set the time of day */
+
+ empty_line();
+
+ printf( asctime( &tm ) );
+ puts( "Init: clock_settime - SUCCESSFUL" );
+ status = clock_settime( CLOCK_REALTIME, &tv );
+ rtems_test_assert( !status );
+
+ printf( asctime( &tm ) );
+ printf( ctime( &tv.tv_sec ) );
+
+ /* use sleep to delay */
+
+ remaining = sleep( 3 );
+ rtems_test_assert( !remaining );
+
+ /* 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 );
+ printf("Time since boot: (%d, %d)\n", tv.tv_sec,tv.tv_nsec );
+
+ status = clock_gettime( CLOCK_REALTIME, &tv );
+ rtems_test_assert( !status );
+
+ printf( ctime( &tv.tv_sec ) );
+
+ seconds = time( NULL );
+ printf( ctime( &seconds ) );
+
+ /* just to have the value copied out through the parameter */
+
+ seconds = time( &seconds1 );
+ rtems_test_assert( seconds == seconds1 );
+
+ /* check the time remaining */
+
+ printf( "Init: seconds remaining (%d)\n", (int)remaining );
+ rtems_test_assert( !remaining );
+
+ /* error cases in nanosleep */
+
+ empty_line();
+ puts( "Init: nanosleep - EINVAL (NULL time)" );
+ status = nanosleep ( NULL, &tr );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ tv.tv_sec = 0;
+ tv.tv_nsec = TOD_NANOSECONDS_PER_SECOND * 2;
+ puts( "Init: nanosleep - EINVAL (too many nanoseconds)" );
+ status = nanosleep ( &tv, &tr );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ /* this is actually a small delay or yield */
+ tv.tv_sec = -1;
+ tv.tv_nsec = 0;
+ puts( "Init: nanosleep - negative seconds small delay " );
+ status = nanosleep ( &tv, &tr );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
+
+ /* use nanosleep to yield */
+
+ tv.tv_sec = 0;
+ tv.tv_nsec = 0;
+
+ puts( "Init: nanosleep - yield with remaining" );
+ status = nanosleep ( &tv, &tr );
+ rtems_test_assert( !status );
+ 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 );
+ rtems_test_assert( !tr.tv_sec );
+ rtems_test_assert( !tr.tv_nsec );
+
+ /* use nanosleep to delay */
+
+ tv.tv_sec = 3;
+ tv.tv_nsec = 500000;
+
+ puts( "Init: nanosleep - 1.05 seconds" );
+ status = nanosleep ( &tv, &tr );
+ rtems_test_assert( !status );
+
+ /* print the current real time again */
+ status = clock_gettime( CLOCK_REALTIME, &tv );
+ rtems_test_assert( !status );
+ printf( ctime( &tv.tv_sec ) );
+
+ /* check the time remaining */
+
+ printf( "Init: sec (%ld), nsec (%ld) remaining\n", tr.tv_sec, tr.tv_nsec );
+ rtems_test_assert( !tr.tv_sec && !tr.tv_nsec );
+
+ puts( "Init: usleep - 1.35 seconds" );
+ useconds = usleep ( 1350000 );
+ rtems_test_assert( useconds < 1350000 );
+
+ /* print the current real time again */
+ status = clock_gettime( CLOCK_REALTIME, &tv );
+ rtems_test_assert( !status );
+ printf( ctime( &tv.tv_sec ) );
+
+ puts( "*** END OF POSIX CLOCK TEST ***" );
+ rtems_test_exit(0);
+}
+
+
+/* configuration information */
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
diff --git a/testsuites/psxtests/psxclock/psxclock.doc b/testsuites/psxtests/psxclock/psxclock.doc
new file mode 100644
index 0000000000..8bb4c5e6c3
--- /dev/null
+++ b/testsuites/psxtests/psxclock/psxclock.doc
@@ -0,0 +1,28 @@
+#
+# $Id$
+#
+# COPYRIGHT (c) 1989-2009.
+# On-Line Applications Research Corporation (OAR).
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: psxclock
+
+directives:
+ clock_settime
+ clock_gettime
+ nanosleep
+ usleep
+ sleep
+
+concepts:
+
++ This is a non-POSIX threads test which uses POSIX services which
+ are available when RTEMS is configured with --disable-posix.
+
++ Ensures that the above listed services have 100% object coverage.
diff --git a/testsuites/psxtests/psxclock/psxclock.scn b/testsuites/psxtests/psxclock/psxclock.scn
new file mode 100644
index 0000000000..6814210d9b
--- /dev/null
+++ b/testsuites/psxtests/psxclock/psxclock.scn
@@ -0,0 +1,31 @@
+*** POSIX CLOCK TEST ***
+Init: clock_gettime - EINVAL (NULL timespec)
+Init: clock_gettime - EINVAL (invalid clockid)
+Init: clock_settime - EINVAL (invalid clockid)
+Thu Jan 1 00:00:01 1970
+Init: clock_settime - before 1988 EINVAL
+Init: clock_getres - EINVAL (invalid clockid)
+Init: clock_getres - EINVAL (NULL resolution)
+Init: clock_getres - SUCCESSFUL
+Init: resolution = sec (0), nsec (10000000)
+
+Fri May 24 11:05:00 1996
+Init: clock_settime - SUCCESSFUL
+Fri May 24 11:05:00 1996
+Fri May 24 11:05:00 1996
+Time since boot: (3, 10131000)
+Fri May 24 11:05:03 1996
+Fri May 24 11:05:03 1996
+Init: seconds remaining (0)
+
+Init: nanosleep - EINVAL (NULL time)
+Init: nanosleep - EINVAL (too many nanoseconds)
+Init: nanosleep - negative seconds small delay
+Init: nanosleep - yield with remaining
+Init: nanosleep - yield with NULL time remaining
+Init: nanosleep - 1.05 seconds
+Fri May 24 11:05:06 1996
+Init: sec (0), nsec (0) remaining
+Init: usleep - 1.35 seconds
+Fri May 24 11:05:07 1996
+*** END OF POSIX CLOCK TEST ***