summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx01
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-18 16:33:35 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-18 16:33:35 +0000
commit0e4232bbd6d49e16c2890e9dd9652eabade607a2 (patch)
treede8254eaaa40106797c25f87617cfaa690bd7f7e /testsuites/psxtests/psx01
parent2008-01-18 Jennifer Averett <jennifer.averett@OARcorp.com> (diff)
downloadrtems-0e4232bbd6d49e16c2890e9dd9652eabade607a2.tar.bz2
2008-01-18 Jennifer Averett <jennifer.averett@OARcorp.com>
* psx01/init.c, psxmsgq01/init.c, psxtimer01/psxtimer.c, psxtimer01/psxtimer01.scn, psxtimer02/psxtimer.c:
Diffstat (limited to 'testsuites/psxtests/psx01')
-rw-r--r--testsuites/psxtests/psx01/init.c14
1 files changed, 11 insertions, 3 deletions
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 );