Changeset 947015f in rtems


Ignore:
Timestamp:
Jul 15, 2010, 1:59:25 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
bbe6a5fe
Parents:
66ed5ff
Message:

2010-07-15 Bharath Suri <bharath.s.jois@…>

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.
Location:
testsuites/psxtests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    r66ed5ff r947015f  
     12010-07-15      Bharath Suri <bharath.s.jois@gmail.com>
     2
     3        PR 1617/testing
     4        * psxfile01/test.c, psxfile01/psxfile01.scn: Added new cases to
     5        exercise_link_r and _unlink_r
     6        * psxstat/test.c, psxstat/psxstat.scn: Added new cases to exercise
     7        _lstat_r and _stat_r.
     8        * psxtime/test.c, psxtime/psxtime.scn: Added new cases to exercise
     9        _gettimeofday.
     10
    1112010-07-16      Sebastian Huber <Sebastian.Huber@embedded-brains.de>
    212
  • testsuites/psxtests/psxfile01/psxfile01.scn

    r66ed5ff r947015f  
    1 
    21*** FILE TEST 1 ***
    32*************** Dump of Entire IMFS ***************
     
    5049tcdrain /tmp/john
    5150Attempt to create a file, open in read-only mode and truncate it
     51Exercise the reentrant version _link_r -- Expect EFAULT
     52Unlink /tmp/bha using the reentrant version -- OK
    5253mknod /tmp/joel
    5354(0)the first write!!!
  • testsuites/psxtests/psxfile01/test.c

    r66ed5ff r947015f  
    3131#include <string.h>
    3232#include <ctype.h>
     33#include <reent.h>
    3334#include <rtems/imfs.h>
    3435
     
    339340  rtems_test_assert( errno == EINVAL );
    340341
    341   status = unlink( "/tmp/bha" );
     342  puts( "Exercise the reentrant version _link_r -- Expect EFAULT" );
     343  status = _link_r( NULL, NULL, NULL );
     344  rtems_test_assert( status == -1 );
     345  rtems_test_assert( errno == EFAULT );
     346
     347  puts( "Unlink /tmp/bha using the reentrant version -- OK" );
     348  status = _unlink_r( NULL, "/tmp/bha" );
    342349  rtems_test_assert( status == 0 );
    343350
  • testsuites/psxtests/psxstat/psxstat.scn

    r66ed5ff r947015f  
    17091709statvfs, with valid path - expect ENOTSUP
    17101710statvfs tested!
     1711Exercise the reentrant version - _stat_r - expect EFAULT
     1712Exercise the reentrant version - _lstat_r - expect EFAULT
    17111713
    17121714
  • testsuites/psxtests/psxstat/test.c

    r66ed5ff r947015f  
    66 *  involved.
    77 *
    8  *  COPYRIGHT (c) 1989-2009.
     8 *  COPYRIGHT (c) 1989-2010.
    99 *  On-Line Applications Research Corporation (OAR).
    1010 *
     
    2424#include <errno.h>
    2525#include <string.h>
     26#include <reent.h>
    2627#include <rtems.h>
    2728#include <rtems/libio.h>
     
    3233#define TIMEOUT_VALUE  ( 5 * rtems_clock_get_ticks_per_second() )
    3334
     35int _lstat_r(struct _reent *, const char *, struct stat *);
    3436
    3537/*
     
    928930  test_statvfs();
    929931
     932  puts( "Exercise the reentrant version - _stat_r - expect EFAULT" );
     933  status = _stat_r( NULL, NULL, NULL );
     934  rtems_test_assert( status == -1 );
     935  rtems_test_assert( errno == EFAULT );
     936
     937  puts( "Exercise the reentrant version - _lstat_r - expect EFAULT" );
     938  status = _lstat_r( NULL, NULL, NULL );
     939  rtems_test_assert( status == -1 );
     940  rtems_test_assert( errno == EFAULT );
     941
    930942  puts( "\n\n*** END OF STAT TEST 01 ***" );
    931943  rtems_test_exit(0);
  • testsuites/psxtests/psxtime/psxtime.scn

    r66ed5ff r947015f  
     1
    12*** POSIX TIME OF DAY TEST ***
    23gettimeofday( NULL, NULL ) - EFAULT
     4_gettimeofday( NULL, NULL ) - EFAULT
    35rtems_clock_set          12:45:00   01/01/1988
    46adjtime - NULL delta - EINVAL
     
    1012adjtime - delta of almost two seconds forward
    1113adjtime - delta of almost one second forward which bumps second
    12 rtems_clock_get_tod          12:45:04   01/01/1988
     14rtems_clock_get_tod          12:45:05   01/01/1988
    1315rtems_clock_set          12:45:00   01/01/1988
    1416rtems_clock_get_tod          12:45:00   01/01/1988
  • testsuites/psxtests/psxtime/test.c

    r66ed5ff r947015f  
    2727extern int adjtime(const struct timeval *delta, struct timeval *olddelta);
    2828#endif
     29
     30extern int _gettimeofday(struct timeval *__p, void *__tz);
    2931
    3032void test_adjtime(void);
     
    203205  rtems_test_assert( errno == EFAULT );
    204206
     207  puts( "_gettimeofday( NULL, NULL ) - EFAULT" );
     208  sc = _gettimeofday( NULL, NULL );
     209  rtems_test_assert( sc == -1 );
     210  rtems_test_assert( errno == EFAULT );
     211
    205212  test_adjtime();
    206213
Note: See TracChangeset for help on using the changeset viewer.