From 84f27fa8fac962af92cad5910f459ffc65222ac5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 18 Aug 2009 14:39:33 +0000 Subject: 2009-08-18 Joel Sherrill * psx01/init.c, psx01/psx01.scn: Add test case for nanosleep with NULL remaining pointer. --- testsuites/psxtests/psx01/init.c | 8 +++++++- testsuites/psxtests/psx01/psx01.scn | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'testsuites/psxtests/psx01') diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c index ca56f58df6..0f44bd193f 100644 --- a/testsuites/psxtests/psx01/init.c +++ b/testsuites/psxtests/psx01/init.c @@ -168,12 +168,18 @@ void *POSIX_Init( tv.tv_sec = 0; tv.tv_nsec = 0; - puts( "Init: nanosleep - yield" ); + 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; diff --git a/testsuites/psxtests/psx01/psx01.scn b/testsuites/psxtests/psx01/psx01.scn index 3a5fbef258..e740fdb072 100644 --- a/testsuites/psxtests/psx01/psx01.scn +++ b/testsuites/psxtests/psx01/psx01.scn @@ -1,27 +1,37 @@ + + *** POSIX TEST 1 *** Init: uname - EFAULT (invalid uts pointer argument) Init: uts.sysname: RTEMS Init: uts.nodename: Node 1 Init: uts.release: 4.9.99.0 Init: uts.version: -Init: uts.machine: SPARC/w/FPU +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 +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 @@ -40,6 +50,7 @@ Init: pthread_create - EAGAIN (too many threads) Init: sched_yield to Task_1 Task_1: sched_yield to Init Init: pthread_exit + Task_1: ID is 0x0b010002 Task_1: pthread_equal - match case passed Task_1: pthread_equal - different case passed -- cgit v1.2.3