diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-09-03 15:04:49 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-09-06 12:22:44 +0200 |
commit | 6d2becb78d46c82fd3bacfb94cbfd02e440f3d67 (patch) | |
tree | b354109b1fa3e7c37c6ed3f2dcce57a41a1bcc64 /testsuites | |
parent | score: Add _TOD_Is_valid_new_time_of_day() (diff) | |
download | rtems-6d2becb78d46c82fd3bacfb94cbfd02e440f3d67.tar.bz2 |
score: Limit the CLOCK_REALTIME setting
Limit the CLOCK_REALTIME setting to ensure that the CLOCK_REALTIME is defined
for a system uptime of at least 114 years.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/psxtests/psxclock/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxclock/init.c b/testsuites/psxtests/psxclock/init.c index 778637b4fd..66d938868b 100644 --- a/testsuites/psxtests/psxclock/init.c +++ b/testsuites/psxtests/psxclock/init.c @@ -131,6 +131,20 @@ static rtems_task Init( rtems_test_assert( sc == -1 ); rtems_test_assert( errno == EINVAL ); + puts( "Init: clock_settime - 2400-01-01T00:00:00.999999999Z SUCCESSFUL" ); + tv.tv_sec = 13569465600; + tv.tv_nsec = 999999999; + sc = clock_settime( CLOCK_REALTIME, &tv ); + rtems_test_assert( sc == 0 ); + + puts( "Init: clock_settime - 2400-01-01T00:00:01Z EINVAL" ); + tv.tv_sec = 13569465601; + tv.tv_nsec = 0; + errno = 0; + sc = clock_settime( CLOCK_REALTIME, &tv ); + rtems_test_assert( sc == -1 ); + rtems_test_assert( errno == EINVAL ); + puts( "Init: clock_settime - far future EINVAL" ); tv.tv_sec = 17179869184; tv.tv_nsec = 0; |