diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-07-23 15:35:35 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-07-23 16:53:24 -0500 |
commit | 875fff0ae3d7676bbd8816caf1b32e33142d2e73 (patch) | |
tree | de7a2c0e7f8dcdef75aac8a9e913de873aa097b6 /testsuites/psxtests/psxtime/test.c | |
parent | adjtime.c: Use timestamp math and simplify (diff) | |
download | rtems-875fff0ae3d7676bbd8816caf1b32e33142d2e73.tar.bz2 |
Add _TOD_Adjust to SCORE TOD Handler.
This lays the proper structure for doing future work on
time adjustment algorithms. Any TOD adjustments should be
requested at the API level and performed at the SCORE level.
Additionally updated a test.
Diffstat (limited to '')
-rw-r--r-- | testsuites/psxtests/psxtime/test.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c index 58484e9605..7620d56d27 100644 --- a/testsuites/psxtests/psxtime/test.c +++ b/testsuites/psxtests/psxtime/test.c @@ -1,8 +1,14 @@ -/* - * This test exercises the time of day services via the Classic - * and POSIX APIs to make sure they are consistent. +/** + * @file * - * COPYRIGHT (c) 1989-2009. + * This test exercises the time of day services via the Classic + * and POSIX APIs to make sure they are consistent. It additionally + * exericses the adjtime() method. + * + */ + +/* + * COPYRIGHT (c) 1989-2014. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -128,11 +134,18 @@ void test_adjtime(void) rtems_test_assert( errno == EINVAL ); puts( "adjtime - delta out of range - EINVAL" ); + delta.tv_sec = 0; delta.tv_usec = 1000000000; /* 100 seconds worth */ sc = adjtime( &delta, &olddelta ); rtems_test_assert( sc == -1 ); rtems_test_assert( errno == EINVAL ); + puts( "adjtime - delta range of 0 - OK" ); + delta.tv_sec = 0; + delta.tv_usec = 0; + sc = adjtime( &delta, &olddelta ); + rtems_test_assert( sc == 0 ); + puts( "adjtime - delta too small - do nothing" ); delta.tv_sec = 0; delta.tv_usec = 1; |