Ignore:
Timestamp:
Jul 1, 2010, 9:15:07 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
5143105e
Parents:
962571e9
Message:

2010-07-01 Joel Sherrill <joel.sherrilL@…>

  • psxfile01/Makefile.am, psxfile01/psxfile01.scn, psxfile01/test.c: Remove tests which put NULL entries in file handlers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxfile01/test.c

    r962571e9 r3f42281e  
    118118
    119119}
    120 
    121 int no_evalformake_IMFS_initialize(
    122   rtems_filesystem_mount_table_entry_t *mt_entry,
    123   const void                           *data
    124 )
    125 {
    126    return IMFS_initialize_support(
    127      mt_entry,
    128      &IMFS_ops_no_evalformake,
    129      &IMFS_memfile_handlers,
    130      &IMFS_directory_handlers,
    131      &IMFS_fifo_handlers
    132    );
    133 }
    134 
    135 int no_rename_IMFS_initialize(
    136   rtems_filesystem_mount_table_entry_t *mt_entry,
    137   const void                           *data
    138 )
    139 {
    140    return IMFS_initialize_support(
    141      mt_entry,
    142      &IMFS_ops_no_rename,
    143      &IMFS_memfile_handlers,
    144      &IMFS_directory_handlers,
    145      &IMFS_fifo_handlers
    146    );
    147 }
    148 
    149120
    150121/*
     
    177148  rtems_time_of_day time;
    178149
    179   IMFS_ops_no_evalformake = IMFS_ops;
    180   IMFS_ops_no_rename = IMFS_ops;
    181 
    182   IMFS_ops_no_evalformake.fsmount_me_h = no_evalformake_IMFS_initialize;
    183   IMFS_ops_no_evalformake.evalformake_h = NULL;
    184 
    185   IMFS_ops_no_rename.fsmount_me_h = no_rename_IMFS_initialize;
    186   IMFS_ops_no_rename.rename_h = NULL;
    187 
    188   puts( "register no eval-for-make filesystem" );
    189   status = rtems_filesystem_register( "nefm", no_evalformake_IMFS_initialize );
    190   rtems_test_assert( status == 0 );
    191  
    192   puts( "register no rename filesystem" );
    193   status = rtems_filesystem_register( "nren", no_rename_IMFS_initialize );
    194   rtems_test_assert( status == 0 );
    195  
    196150  printf( "\n\n*** FILE TEST 1 ***\n" );
    197151
     
    450404  rtems_test_assert(status == -1);
    451405  rtems_test_assert(errno == EXDEV);
    452 
    453   puts("Unmounting /imfs");
    454   status = unmount("/imfs");
    455   rtems_test_assert(status == 0);
    456 
    457   puts("Mounting filesystem @ /imfs with no support for evalformake");
    458  
    459   status = mount("null", "/imfs", "nefm", RTEMS_FILESYSTEM_READ_WRITE, NULL);
    460   rtems_test_assert(status == 0);
    461 
    462   puts("change directory to /imfs");
    463   status = chdir("/imfs");
    464   rtems_test_assert(status == 0);
    465 
    466   puts("exercise _rename_r, with target on /imfs - expected ENOTSUP");
    467   puts("attempt to rename /tmp/joel to joel");
    468   status = _rename_r(NULL, "/tmp/joel", "joel");
    469   rtems_test_assert(status == -1);
    470   rtems_test_assert(errno == ENOTSUP);
    471 
    472   puts("change directory to /");
    473   status = chdir("/");
    474   rtems_test_assert(status == 0);
    475  
    476   status = unmount("/imfs");
    477   rtems_test_assert(status == 0);
    478 
    479 
    480   puts("Mounting filesystem @ /imfs with no support for rename");
    481   status = mount("null", "/imfs", "nren", RTEMS_FILESYSTEM_READ_WRITE, NULL);
    482   rtems_test_assert(status == 0);
    483 
    484   puts("creating directory /imfs/test");
    485   status = mkdir("/imfs/test", 0777);
    486   rtems_test_assert(status == 0);
    487 
    488   puts("creating directory /imfs/test/old_dir");
    489   status = mkdir("/imfs/test/old_dir", 0777);
    490   rtems_test_assert(status == 0);
    491 
    492   puts("changing to /");
    493   status = chdir("/");
    494  
    495   puts("attempt to rename imfs/old_dir to imfs/new_dir");
    496   status = _rename_r(NULL, "imfs/test/old_dir", "imfs/test/new_dir");
    497   rtems_test_assert(status == -1);
    498   rtems_test_assert(errno == ENOTSUP);
    499 
    500   puts("unmounting /imfs");
    501   status = unmount("/imfs");
    502   rtems_test_assert(status == 0);
    503406
    504407  puts("End of _rename_r tests");
Note: See TracChangeset for help on using the changeset viewer.