diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-10-21 21:22:25 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-10-21 21:22:25 +0000 |
commit | 33c46f1a7014a1aa2e403aa7d089259cd09508b1 (patch) | |
tree | 2e9d13a2052f162a11cab13a84a4e557c62e8745 /testsuites/psxtests/psxmount | |
parent | Typo. (diff) | |
download | rtems-33c46f1a7014a1aa2e403aa7d089259cd09508b1.tar.bz2 |
2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* psx02/init.c, psx02/task.c, psx03/init.c, psx04/init.c,
psx04/task1.c, psx04/task2.c, psx04/task3.c, psx05/init.c,
psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c,
psx06/task.c, psx06/task2.c, psx07/init.c, psx08/init.c,
psx08/task2.c, psx08/task3.c, psx09/init.c, psx10/init.c,
psx10/task.c, psx10/task2.c, psx10/task3.c, psx11/init.c,
psx11/task.c, psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c,
psxcancel01/init.c, psxchroot01/test.c, psxitimer/init.c,
psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c,
psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.c,
psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c,
psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c,
psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c,
psxstack01/init.c, psxstack02/init.c, psxualarm/init.c: Eliminate
double space after parenthesis on rtems_test_assert().
Diffstat (limited to 'testsuites/psxtests/psxmount')
-rw-r--r-- | testsuites/psxtests/psxmount/test.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/testsuites/psxtests/psxmount/test.c b/testsuites/psxtests/psxmount/test.c index e2c48122ba..b3dc2e758b 100644 --- a/testsuites/psxtests/psxmount/test.c +++ b/testsuites/psxtests/psxmount/test.c @@ -130,23 +130,23 @@ int main( printf("create /b/my_file\n"); fd = open ("/b/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); - rtems_test_assert( fd != 0 ); + rtems_test_assert( fd != 0 ); close (fd); printf("Verify /b/my_file\n"); fd = open("/b/my_file", S_IRWXU|S_IRWXG|S_IRWXO); - rtems_test_assert( fd != 0 ); + rtems_test_assert( fd != 0 ); close( fd ); printf("create c/y/my_mount_point/my_dir/d\n"); fd = open ("c/y/my_mount_point/my_dir/d", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); - rtems_test_assert( fd != 0 ); + rtems_test_assert( fd != 0 ); close (fd); printf("Verify c/y/my_mount_point/my_dir/d\n"); fd = open("c/y/my_mount_point/my_dir/d", S_IRWXU|S_IRWXG|S_IRWXO); - rtems_test_assert( fd != 0 ); + rtems_test_assert( fd != 0 ); close( fd ); /* @@ -160,7 +160,7 @@ int main( "imfs", RTEMS_FILESYSTEM_READ_WRITE, NULL ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf("2nd file system successfully mounted at /c/z/my_mount_point \n"); /* @@ -216,8 +216,8 @@ int main( "nofound", RTEMS_FILESYSTEM_READ_WRITE, NULL ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EINVAL ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EINVAL ); /* * Verify mount with option of -62 fails with EINVAL @@ -230,8 +230,8 @@ int main( "imfs", -62, NULL ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EINVAL ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EINVAL ); /* * Mount a Read Only File system. @@ -244,7 +244,7 @@ int main( "imfs", RTEMS_FILESYSTEM_READ_ONLY, NULL ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf("Read only file system successfully mounted at /c/y/my_mount_point \n"); /* @@ -253,11 +253,11 @@ int main( printf("create c/y/my_mount_point/../../y/my_mount_point/new_dir\n"); status = mkdir("c/y/my_mount_point/../../y/my_mount_point/new_dir",S_IRWXU ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); status = stat("c/y/my_mount_point/../../y/my_mount_point/new_dir",&statbuf ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); status = stat("c/y/my_mount_point/new_dir/..", &statbuf ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); /* * Attempt to mount a second file system at a used mount point. @@ -270,8 +270,8 @@ int main( "imfs", RTEMS_FILESYSTEM_READ_ONLY, NULL ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EBUSY); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EBUSY); /* * Attempt to mount at a file. @@ -284,8 +284,8 @@ int main( "imfs", RTEMS_FILESYSTEM_READ_ONLY, NULL ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == ENOTDIR ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == ENOTDIR ); /* @@ -294,15 +294,15 @@ int main( printf("Create and chdir to /c/y/my_mount_point/mydir\n"); status = mkdir( "/c/y/my_mount_point/mydir", 0777); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); status = chdir( "/c/y/my_mount_point/mydir" ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf("unmount of /c/y/my_mount_point should fail with EBUSY\n"); status = unmount( "/c/y/my_mount_point" ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EBUSY ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EBUSY ); /* * Chdir to root and verify we can unmount the file system now. @@ -310,11 +310,11 @@ int main( printf("chdir to / and verify we can unmount /c/y/my_mount_point\n"); status = chdir( "/" ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf("unmount /c/y/my_mount_point \n"); status = unmount( "/c/y/my_mount_point" ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); /* * Attempt to unmount a directory that does not exist. @@ -322,8 +322,8 @@ int main( printf("unmount /b/mount_point should fail with EINVAL\n"); status = unmount( "/b/mount_point" ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == ENOENT ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == ENOENT ); /* * Remount the filesystem. @@ -336,7 +336,7 @@ int main( "imfs", RTEMS_FILESYSTEM_READ_ONLY, NULL ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); /* * Create a file and directory then open the directory. @@ -345,24 +345,24 @@ int main( printf("Create and open /c/y/my_mount_point/my_file\n"); fd = open( "/c/y/my_mount_point/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); - rtems_test_assert( fd != -1 ); + rtems_test_assert( fd != -1 ); status = close( fd ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf("\nmkdir /c/y/my_mount_point/my_dir\n"); status = mkdir( "/c/y/my_mount_point/my_dir", 0x1c0 ); printf("Open /c/y/my_mount_point/my_dir\n"); directory = opendir( "/c/y/my_mount_point/my_dir" ); - rtems_test_assert( directory ); + rtems_test_assert( directory ); printf("Unmount /c/y/my_mount_point should fail with EBUSY\n"); status = unmount( "/c/y/my_mount_point" ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EBUSY ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EBUSY ); printf("Close /c/y/my_mount_point/my_dir\n"); status = closedir( directory ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); /* * Attempt to unmount a directory that is not a mount point. @@ -370,8 +370,8 @@ int main( printf("Unmount /c/y/my_mount_point/my_dir should fail with EACCES\n"); status = unmount( "/c/y/my_mount_point/my_dir" ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EACCES ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EACCES ); /* * Verify a file system can not be unmounted with a mounted file system @@ -385,12 +385,12 @@ int main( "imfs", RTEMS_FILESYSTEM_READ_WRITE, NULL ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf("unmount /c/y/my_mount_point should fail with EBUSY\n"); status = unmount( "/c/y/my_mount_point" ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EBUSY ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EBUSY ); /* * Verify you cannot create a hard link across mounted file systems. @@ -398,11 +398,11 @@ int main( printf("Verify a hard link across filesystems fails with EXDEV\n"); status = mkdir( "/c/y/my_mount_point/my_dir2", S_IRWXU ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); status = link( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" ); - rtems_test_assert( status == -1 ); - rtems_test_assert( errno == EXDEV ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == EXDEV ); /* * Create a symbolic link across mountpoints. @@ -410,13 +410,13 @@ int main( printf("Verify a symbolic link across file systems works\n"); status = symlink( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf("unmount /c/y/my_mount_point/my_dir\n"); status = unmount( "/c/y/my_mount_point/my_dir" ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); /* * Verify symblic link no longer works. @@ -424,11 +424,11 @@ int main( printf("Verify the symbolic link now fails\n"); status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf ); - rtems_test_assert( status != 0 ); + rtems_test_assert( status != 0 ); printf("unmount /c/y/my_mount_point\n"); status = unmount( "/c/y/my_mount_point" ); - rtems_test_assert( status == 0 ); + rtems_test_assert( status == 0 ); printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" ); rtems_test_exit(0); |