diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-12 13:20:03 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-12 13:20:03 +0000 |
commit | 0bf2f75b9902819cfa14e223f9f5c3223f78fce5 (patch) | |
tree | a63ca058f7f7de9507f164baff53b05cfe537fdd /rtems-test-template | |
parent | e7638a555c97d3304ab3f9d2c2aa49017ebcf4fb (diff) |
2011-07-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxtmtest_single/init.c: Fix operation count and move timing to
method.
Diffstat (limited to 'rtems-test-template')
-rw-r--r-- | rtems-test-template/ChangeLog | 5 | ||||
-rw-r--r-- | rtems-test-template/psxtmtest_single/init.c | 30 |
2 files changed, 24 insertions, 11 deletions
diff --git a/rtems-test-template/ChangeLog b/rtems-test-template/ChangeLog index bc2716e..7ce0007 100644 --- a/rtems-test-template/ChangeLog +++ b/rtems-test-template/ChangeLog @@ -1,3 +1,8 @@ +2011-07-12 Joel Sherrill <joel.sherrill@oarcorp.com> + + * psxtmtest_single/init.c: Fix operation count and move timing to + method. + 2011-06-30 Joel Sherrill <joel.sherrill@oarcorp.com> * psxtmtest_blocking/init.c: Add tmacros.h diff --git a/rtems-test-template/psxtmtest_single/init.c b/rtems-test-template/psxtmtest_single/init.c index 741a6de..d9a24a6 100644 --- a/rtems-test-template/psxtmtest_single/init.c +++ b/rtems-test-template/psxtmtest_single/init.c @@ -17,30 +17,38 @@ #include <rtems/timerdrv.h> #include "test_support.h" -void *POSIX_Init( - void *argument -) +void benchmark_NAME_OF_OPERATION(void) { long end_time; - - puts( "\n\n*** POSIX TIME TEST @UPPER@ ***" ); - - /* XXX any required initialization goes here */ + int status; benchmark_timer_initialize(); - - /* XXX single shot operation goes here */ - + /* XXX single shot operation goes here -- test expected status outside */ + /* XXX of the benchmark'ed region */ end_time = benchmark_timer_read(); + rtems_test_assert( status == 0 ); put_time( "@DESC@", end_time, - OPERATION_COUNT, + 1, /* Only executed once */ 0, 0 ); +} + +void *POSIX_Init( + void *argument +) +{ + + puts( "\n\n*** POSIX TIME TEST @UPPER@ ***" ); + + /* XXX any required initialization goes here */ + + benchmark_NAME_OF_OPERATION(); + puts( "*** END OF POSIX TIME TEST @UPPER@ ***" ); rtems_test_exit(0); |