summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spclockget
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-06-11 16:42:05 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-06-11 16:42:05 +0000
commitf4773a477a59e098f8bce2543bbf176fb729a4f5 (patch)
treec0e283f611f37fef419da4e7be6f0eb29b5a8907 /testsuites/sptests/spclockget
parent2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-f4773a477a59e098f8bce2543bbf176fb729a4f5.tar.bz2
2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen02.c, sp09/screen13.c, sp09/sp09.scn, sp29/init.c, sp30/sp30.scn, sp32/init.c, spclockget/init.c: Avoid use of deprecated rtems_clock_get() except in spclockget().
Diffstat (limited to 'testsuites/sptests/spclockget')
-rw-r--r--testsuites/sptests/spclockget/init.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/testsuites/sptests/spclockget/init.c b/testsuites/sptests/spclockget/init.c
index a2648ebd18..5ee57357c6 100644
--- a/testsuites/sptests/spclockget/init.c
+++ b/testsuites/sptests/spclockget/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,6 +31,16 @@ rtems_task Init(
sc = rtems_clock_set( &time );
directive_failed( sc, "rtems_clock_set" );
+ /* NULL parameter */
+ sc = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, NULL );
+ fatal_directive_status( sc, RTEMS_INVALID_ADDRESS, "null pointer" );
+ puts( "TA1 - rtems_clock_get - RTEMS_INVALID_ADDRESS" );
+
+ /* arbitrary bad value for switch */
+ sc = rtems_clock_get( 0xff, &timev );
+ fatal_directive_status( sc, RTEMS_INVALID_NUMBER, "bad case" );
+ puts( "TA1 - rtems_clock_get - RTEMS_INVALID_NUMBER" );
+
sc = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
directive_failed( sc, "rtems_clock_get -- TOD" );
print_time( "Init - rtems_clock_get - ", &time, "\n" );