summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxtime
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-15 13:59:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-15 13:59:25 +0000
commit947015fbf3fe206ac59dbe90a16f1de8db7f112c (patch)
tree74d49c89d77bdab182bd84a6059000d3cde0cce1 /testsuites/psxtests/psxtime
parent2010-07-15 Bharath Suri <bharath.s.jois@gmail.com> (diff)
downloadrtems-947015fbf3fe206ac59dbe90a16f1de8db7f112c.tar.bz2
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.
Diffstat (limited to 'testsuites/psxtests/psxtime')
-rw-r--r--testsuites/psxtests/psxtime/psxtime.scn4
-rw-r--r--testsuites/psxtests/psxtime/test.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/testsuites/psxtests/psxtime/psxtime.scn b/testsuites/psxtests/psxtime/psxtime.scn
index 6f6602db37..d41082d6fe 100644
--- a/testsuites/psxtests/psxtime/psxtime.scn
+++ b/testsuites/psxtests/psxtime/psxtime.scn
@@ -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
diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c
index 41db252450..d1f056b9e6 100644
--- a/testsuites/psxtests/psxtime/test.c
+++ b/testsuites/psxtests/psxtime/test.c
@@ -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();
/*