diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-06-11 16:42:05 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-06-11 16:42:05 +0000 |
commit | f4773a477a59e098f8bce2543bbf176fb729a4f5 (patch) | |
tree | c0e283f611f37fef419da4e7be6f0eb29b5a8907 /testsuites/sptests | |
parent | 2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-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')
-rw-r--r-- | testsuites/sptests/ChangeLog | 6 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen02.c | 24 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen13.c | 6 | ||||
-rw-r--r-- | testsuites/sptests/sp09/sp09.scn | 9 | ||||
-rw-r--r-- | testsuites/sptests/sp29/init.c | 8 | ||||
-rw-r--r-- | testsuites/sptests/sp30/sp30.scn | 28 | ||||
-rw-r--r-- | testsuites/sptests/sp32/init.c | 17 | ||||
-rw-r--r-- | testsuites/sptests/spclockget/init.c | 12 |
8 files changed, 49 insertions, 61 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index abdafe4a9e..b91babaebc 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,9 @@ +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(). + 2011-05-20 Sebastian Huber <sebastian.huber@embedded-brains.de> * spintrcritical01/init.c: Fixed warning fix. diff --git a/testsuites/sptests/sp09/screen02.c b/testsuites/sptests/sp09/screen02.c index 4536a500a4..ce9c2a8014 100644 --- a/testsuites/sptests/sp09/screen02.c +++ b/testsuites/sptests/sp09/screen02.c @@ -6,7 +6,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -121,28 +121,10 @@ void Screen2() fatal_directive_status( status, RTEMS_INVALID_ADDRESS, - "rtems_clock_get sull pointer" + "rtems_clock_set sull pointer" ); puts( "TA1 - rtems_clock_set - RTEMS_INVALID_ADDRESS" ); - /* NULL parameter */ - status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, NULL ); - fatal_directive_status( - status, - RTEMS_INVALID_ADDRESS, - "rtems_clock_get null pointer" - ); - puts( "TA1 - rtems_clock_get - RTEMS_INVALID_ADDRESS" ); - - /* arbitrary bad value for switch */ - status = rtems_clock_get( 0xff, &tv ); - fatal_directive_status( - status, - RTEMS_INVALID_NUMBER, - "rtems_clock_get bad case" - ); - puts( "TA1 - rtems_clock_get - RTEMS_INVALID_NUMBER" ); - /* wake when NULL param */ status = rtems_task_wake_when( NULL ); fatal_directive_status( @@ -156,7 +138,7 @@ void Screen2() status = rtems_task_wake_when( &time ); if ( status == RTEMS_SUCCESSFUL ) { puts( - "TA1 - rtems_clock_get - RTEMS_NOT_DEFINED -- " + "TA1 - rtems_task_wake_when - RTEMS_NOT_DEFINED -- " "DID BSP SET THE TIME OF DAY?" ); } else { diff --git a/testsuites/sptests/sp09/screen13.c b/testsuites/sptests/sp09/screen13.c index 5fb68b1d24..8f62f32adc 100644 --- a/testsuites/sptests/sp09/screen13.c +++ b/testsuites/sptests/sp09/screen13.c @@ -6,7 +6,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -85,8 +85,8 @@ void Screen13() print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" ); status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); status = rtems_clock_get_tod( &time ); - directive_failed( status, "rtems_clock_set" ); - print_time( "TA1 - rtems_clock_get - ", &time, " - RTEMS_SUCCESSFUL\n" ); + directive_failed( status, "rtems_clock_get_tod" ); + print_time( "TA1 - rtems_clock_get_tod - ", &time, " - RTEMS_SUCCESSFUL\n" ); build_time( &time, 12, 31, 2100, 23, 59, 59, 0 ); status = rtems_clock_set( &time ); diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn index 896b9b0b2a..c26d7e6a53 100644 --- a/testsuites/sptests/sp09/sp09.scn +++ b/testsuites/sptests/sp09/sp09.scn @@ -35,8 +35,6 @@ TA1 - rtems_clock_get_tod_timeval - RTEMS_INVALID_ADDRESS TA1 - rtems_clock_get_tod_timeval - RTEMS_NOT_DEFINED TA1 - rtems_clock_set_nanoseconds_extension - RTEMS_INVALID_ADDRESS TA1 - rtems_clock_set - RTEMS_INVALID_ADDRESS -TA1 - rtems_clock_get - RTEMS_INVALID_ADDRESS -TA1 - rtems_clock_get - RTEMS_INVALID_NUMBER TA1 - rtems_task_wake_when - RTEMS_INVALID_ADDRESS TA1 - rtems_task_wake_when - RTEMS_NOT_DEFINED TA1 - rtems_timer_fire_when - RTEMS_NOT_DEFINED @@ -175,8 +173,9 @@ TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL TA3 - rtems_message_queue_receive - woke up with RTEMS_OBJECT_WAS_DELETED TA3 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL <pause - screen 9> -TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS -- SKIPPED -TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS - SKIPPED +TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER +TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS +TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS TA1 - rtems_signal_send - RTEMS_INVALID_ID TA1 - rtems_signal_send - RTEMS_INVALID_NUMBER TA1 - rtems_signal_send - RTEMS_NOT_DEFINED @@ -286,7 +285,7 @@ TA1 - rtems_io_write - RTEMS_INVALID_NUMBER TA1 - rtems_clock_set - 23:59:59 12/31/2000 - RTEMS_SUCCESSFUL TA1 - rtems_clock_get_tod - 00:00:00 01/01/2001 - RTEMS_SUCCESSFUL TA1 - rtems_clock_set - 23:59:59 12/31/1999 - RTEMS_SUCCESSFUL -TA1 - rtems_clock_get - 00:00:00 01/01/2000 - RTEMS_SUCCESSFUL +TA1 - rtems_clock_get_tod - 00:00:00 01/01/2000 - RTEMS_SUCCESSFUL TA1 - rtems_clock_set - 23:59:59 12/31/2100 - RTEMS_SUCCESSFUL TA1 - rtems_clock_get_tod - 17:31:44 11/25/1964 - RTEMS_SUCCESSFUL TA1 - rtems_clock_set - 23:59:59 12/31/2099 - RTEMS_SUCCESSFUL diff --git a/testsuites/sptests/sp29/init.c b/testsuites/sptests/sp29/init.c index 001b6716e3..5d9e10448d 100644 --- a/testsuites/sptests/sp29/init.c +++ b/testsuites/sptests/sp29/init.c @@ -165,9 +165,9 @@ rtems_task Init (rtems_task_argument ignored) * Since this task is holding this, this task will block and timeout. * Then the timeout error will be returned. */ - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); + then = rtems_clock_get_ticks_since_boot(); sc = rtems_semaphore_obtain (semnorec, RTEMS_WAIT, 5); - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); + now = rtems_clock_get_ticks_since_boot(); if (sc == RTEMS_SUCCESSFUL) { printf ("%d: Reobtain non-recursive-lock semaphore -- and should not have.\n", __LINE__); } @@ -178,12 +178,12 @@ rtems_task Init (rtems_task_argument ignored) printf ("%d: Reobtain non-recursive-lock semaphore failed without timeout.\n", __LINE__); startTask (semnorec); - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); + then = rtems_clock_get_ticks_since_boot(); for (i = 0 ; i < 5 ; i++) { rtems_interval diff; sc = rtems_semaphore_obtain (semnorec, RTEMS_WAIT, RTEMS_NO_TIMEOUT); - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); + now = rtems_clock_get_ticks_since_boot(); diff = (now - then); then = now; if (sc != RTEMS_SUCCESSFUL) diff --git a/testsuites/sptests/sp30/sp30.scn b/testsuites/sptests/sp30/sp30.scn index 5950d890c7..70e99f6608 100644 --- a/testsuites/sptests/sp30/sp30.scn +++ b/testsuites/sptests/sp30/sp30.scn @@ -2,18 +2,18 @@ timer_initiate_server -- INVALID_PRIORITY timer_initiate_server -- OK timer_initiate_server -- already started -TA1 - rtems_clock_get - 09:00:00 12/31/1988 -TA2 - rtems_clock_get - 09:00:00 12/31/1988 -TA3 - rtems_clock_get - 09:00:00 12/31/1988 -TA1 - rtems_clock_get - 09:00:05 12/31/1988 -TA2 - rtems_clock_get - 09:00:10 12/31/1988 -TA1 - rtems_clock_get - 09:00:10 12/31/1988 -TA1 - rtems_clock_get - 09:00:15 12/31/1988 -TA3 - rtems_clock_get - 09:00:15 12/31/1988 -TA2 - rtems_clock_get - 09:00:20 12/31/1988 -TA1 - rtems_clock_get - 09:00:20 12/31/1988 -TA1 - rtems_clock_get - 09:00:25 12/31/1988 -TA2 - rtems_clock_get - 09:00:30 12/31/1988 -TA1 - rtems_clock_get - 09:00:30 12/31/1988 -TA3 - rtems_clock_get - 09:00:30 12/31/1988 +TA1 - rtems_clock_get_tod - 09:00:00 12/31/1988 +TA2 - rtems_clock_get_tod - 09:00:00 12/31/1988 +TA3 - rtems_clock_get_tod - 09:00:00 12/31/1988 +TA1 - rtems_clock_get_tod - 09:00:05 12/31/1988 +TA2 - rtems_clock_get_tod - 09:00:10 12/31/1988 +TA1 - rtems_clock_get_tod - 09:00:10 12/31/1988 +TA1 - rtems_clock_get_tod - 09:00:15 12/31/1988 +TA3 - rtems_clock_get_tod - 09:00:15 12/31/1988 +TA2 - rtems_clock_get_tod - 09:00:20 12/31/1988 +TA1 - rtems_clock_get_tod - 09:00:20 12/31/1988 +TA1 - rtems_clock_get_tod - 09:00:25 12/31/1988 +TA2 - rtems_clock_get_tod - 09:00:30 12/31/1988 +TA1 - rtems_clock_get_tod - 09:00:30 12/31/1988 +TA3 - rtems_clock_get_tod - 09:00:30 12/31/1988 *** END OF TEST 30 *** diff --git a/testsuites/sptests/sp32/init.c b/testsuites/sptests/sp32/init.c index f6eb2270d8..0b484a865b 100644 --- a/testsuites/sptests/sp32/init.c +++ b/testsuites/sptests/sp32/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 @@ -39,8 +39,7 @@ rtems_task Init( directive_failed(status, "rate_monotonic_period #1"); /* get our first timestamp */ - status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, ×tamps[0] ); - directive_failed(status, "clock_get"); + timestamps[0] = rtems_clock_get_ticks_since_boot(); /* loop through and gather more timestamps */ for (loopy = 1; loopy < 5; loopy++) { @@ -48,11 +47,7 @@ rtems_task Init( status = rtems_rate_monotonic_period( period_id, wantintervals[loopy] ); directive_failed(status, "rate_monotonic_period #2"); - status = rtems_clock_get( - RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, - ×tamps[loopy] - ); - directive_failed(status, "clock_get"); + timestamps[loopy] = rtems_clock_get_ticks_since_boot(); } /* block one last time */ @@ -60,11 +55,7 @@ rtems_task Init( directive_failed(status, "rate_monotonic_period #3"); /* get one last timestamp */ - status = rtems_clock_get( - RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, - ×tamps[loopy] - ); - directive_failed(status, "clock_get"); + timestamps[loopy] = rtems_clock_get_ticks_since_boot(); /* cancel the period */ status = rtems_rate_monotonic_cancel(period_id); 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" ); |