From 0e4232bbd6d49e16c2890e9dd9652eabade607a2 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Fri, 18 Jan 2008 16:33:35 +0000 Subject: 2008-01-18 Jennifer Averett * psx01/init.c, psxmsgq01/init.c, psxtimer01/psxtimer.c, psxtimer01/psxtimer01.scn, psxtimer02/psxtimer.c: --- testsuites/psxtests/psx01/init.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'testsuites/psxtests/psx01') diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c index c503260748..acd1986100 100644 --- a/testsuites/psxtests/psx01/init.c +++ b/testsuites/psxtests/psx01/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -52,8 +52,13 @@ void *POSIX_Init( /* error cases in clock_gettime and clock_settime */ + puts( "Init: clock_gettime - EINVAL (NULL timespec)" ); + status = clock_gettime( CLOCK_REALTIME, NULL ); + assert( status == -1 ); + assert( errno == EINVAL ); + puts( "Init: clock_gettime - EINVAL (invalid clockid)" ); - status = clock_settime( -1, &tv ); + status = clock_gettime( -1, &tv ); assert( status == -1 ); assert( errno == EINVAL ); @@ -102,8 +107,11 @@ void *POSIX_Init( remaining = sleep( 3 ); assert( !remaining ); - + /* print new times to make sure it has changed and we can get the realtime */ + status = clock_gettime( CLOCK_PROCESS_CPUTIME, &tv ); + assert( !status ); + printf("Time since boot: (%d, %d)\n", tv.tv_sec,tv.tv_nsec ); status = clock_gettime( CLOCK_REALTIME, &tv ); assert( !status ); -- cgit v1.2.3