Ignore:
File:
1 edited

Legend:

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

    r847ad44 r6c2de60  
    315315  rtems_test_assert( status == 0 );
    316316
    317   printf("unmount of /c/y/my_mount_point should fail with EBUSY\n");
    318   status = unmount( "/c/y/my_mount_point" );
    319   rtems_test_assert( status == -1 );
    320   rtems_test_assert( errno == EBUSY );
    321 
    322   status = chdir( "/" );
    323   rtems_test_assert( status == 0 );
    324 
    325   printf("chroot to /c/y/my_mount_point\n");
    326   status = chroot( "/c/y/my_mount_point" );
    327   rtems_test_assert( status == 0 );
    328 
    329   printf("unmount of . should fail with EBUSY\n");
    330   status = unmount( "." );
    331   rtems_test_assert( status == -1 );
    332   rtems_test_assert( errno == EBUSY );
    333 
    334   /*
    335    * Chdir to root and verify we unmounted the file system now.
    336    */
    337 
    338   printf("chroot to / and verify we can unmount /c/y/my_mount_point\n");
    339   status = chroot( "/" );
    340   rtems_test_assert( status == 0 );
    341 
    342317  printf("unmount of /c/y/my_mount_point\n");
    343318  status = unmount( "/c/y/my_mount_point" );
     319  rtems_test_assert( status == 0 );
     320
     321  printf("chdir to .. should fail with ENXIO\n");
     322  status = chdir( ".." );
     323  rtems_test_assert( status == -1 );
     324  rtems_test_assert( errno == ENXIO );
     325
     326  /*
     327   * Chdir to root and verify we unmounted the file system now.
     328   */
     329
     330  printf("chdir to / and verify we can unmount /c/y/my_mount_point\n");
     331  status = chdir( "/" );
    344332  rtems_test_assert( status == 0 );
    345333
     
    389377  rtems_test_assert( directory );
    390378
     379  printf("mkdir %s should fail with EEXIST\n", my_sub_fs_dir );
     380  status = mkdir( my_sub_fs_dir, S_IRWXU );
     381  rtems_test_assert( status == -1 );
     382  rtems_test_assert( errno == EEXIST );
     383
     384  printf("unmount %s\n", mount_point );
     385  status = unmount( mount_point );
     386  rtems_test_assert( status == 0 );
     387
    391388  printf("close %s\n", my_sub_fs_dir );
    392389  status = closedir( directory );
    393   rtems_test_assert( status == 0 );
    394 
    395   printf("mkdir %s should fail with EEXIST\n", my_sub_fs_dir );
    396   status = mkdir( my_sub_fs_dir, S_IRWXU );
    397   rtems_test_assert( status == -1 );
    398   rtems_test_assert( errno == EEXIST );
    399 
    400   printf("unmount %s\n", mount_point );
    401   status = unmount( mount_point );
    402390  rtems_test_assert( status == 0 );
    403391
Note: See TracChangeset for help on using the changeset viewer.