forked from Imagelibrary/rtems
2010-07-15 Bharath Suri <bharath.s.jois@gmail.com>
PR 1617/testing * psxfile01/test.c, psxfile01/psxfile01.scn: Added new cases to exercise_link_r and _unlink_r * psxstat/test.c, psxstat/psxstat.scn: Added new cases to exercise _lstat_r and _stat_r. * psxtime/test.c, psxtime/psxtime.scn: Added new cases to exercise _gettimeofday.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
*** POSIX TIME OF DAY TEST ***
|
||||
gettimeofday( NULL, NULL ) - EFAULT
|
||||
_gettimeofday( NULL, NULL ) - EFAULT
|
||||
rtems_clock_set 12:45:00 01/01/1988
|
||||
adjtime - NULL delta - EINVAL
|
||||
adjtime - delta out of range - EINVAL
|
||||
@@ -9,7 +11,7 @@ adjtime - delta of one second forward, olddelta=NULL
|
||||
adjtime - delta of one second forward
|
||||
adjtime - delta of almost two seconds forward
|
||||
adjtime - delta of almost one second forward which bumps second
|
||||
rtems_clock_get_tod 12:45:04 01/01/1988
|
||||
rtems_clock_get_tod 12:45:05 01/01/1988
|
||||
rtems_clock_set 12:45:00 01/01/1988
|
||||
rtems_clock_get_tod 12:45:00 01/01/1988
|
||||
gettimeofday: Fri Jan 1 12:45:00 1988
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
extern int adjtime(const struct timeval *delta, struct timeval *olddelta);
|
||||
#endif
|
||||
|
||||
extern int _gettimeofday(struct timeval *__p, void *__tz);
|
||||
|
||||
void test_adjtime(void);
|
||||
void check_a_tod(
|
||||
rtems_time_of_day *the_tod
|
||||
@@ -202,6 +204,11 @@ int main(
|
||||
rtems_test_assert( sc == -1 );
|
||||
rtems_test_assert( errno == EFAULT );
|
||||
|
||||
puts( "_gettimeofday( NULL, NULL ) - EFAULT" );
|
||||
sc = _gettimeofday( NULL, NULL );
|
||||
rtems_test_assert( sc == -1 );
|
||||
rtems_test_assert( errno == EFAULT );
|
||||
|
||||
test_adjtime();
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user