From 3106d7cdd08372cbf154d7f645ada18bba261365 Mon Sep 17 00:00:00 2001 From: Christopher Kerl Date: Wed, 2 Jan 2013 11:37:07 -0600 Subject: IMFS: Generating .scn (Screen Shots) #2 --- testsuites/fstests/imfs_fserror/imfs_fserror.scn | 94 ++++++++++++++++++++++ testsuites/fstests/imfs_fslink/imfs_fslink.scn | 15 ++++ .../fstests/imfs_fspatheval/imfs_fspathenval.scn | 81 +++++++++++++++++++ .../imfs_fspermission/imfs_fspermission.scn | 52 ++++++++++++ testsuites/fstests/imfs_fsrdwr/imfs_fsrdwr.scn | 22 +++++ testsuites/fstests/imfs_fstime/imfs_fstime.scn | 12 +++ 6 files changed, 276 insertions(+) create mode 100644 testsuites/fstests/imfs_fserror/imfs_fserror.scn create mode 100644 testsuites/fstests/imfs_fslink/imfs_fslink.scn create mode 100644 testsuites/fstests/imfs_fspatheval/imfs_fspathenval.scn create mode 100644 testsuites/fstests/imfs_fspermission/imfs_fspermission.scn create mode 100644 testsuites/fstests/imfs_fsrdwr/imfs_fsrdwr.scn create mode 100644 testsuites/fstests/imfs_fstime/imfs_fstime.scn (limited to 'testsuites') diff --git a/testsuites/fstests/imfs_fserror/imfs_fserror.scn b/testsuites/fstests/imfs_fserror/imfs_fserror.scn new file mode 100644 index 0000000000..040ea13041 --- /dev/null +++ b/testsuites/fstests/imfs_fserror/imfs_fserror.scn @@ -0,0 +1,94 @@ +*** FILE SYSTEM TEST ( IMFS ) *** +Initializing filesystem IMFS + + +*** ERROR TEST *** +Testing open with arguments: "name01, O_CREAT | O_EXCL" EXPECT "EEXIST" +PASS +Testing mkdir with arguments: "name01, mode" EXPECT "EEXIST" +PASS +Testing open with arguments: "name02, O_WRONLY" EXPECT "EISDIR" +PASS +Testing open with arguments: "name02, O_RDWR" EXPECT "EISDIR" +PASS +Testing open with arguments: "name, O_WRONLY" EXPECT "ENOENT" +PASS +Testing open with arguments: "\"\", O_WRONLY" EXPECT "ENOENT" +PASS +Testing open with arguments: "name03, O_WRONLY" EXPECT "ENOENT" +PASS +Testing mkdir with arguments: "name, mode" EXPECT "ENOENT" +PASS +Testing mkdir with arguments: "\"\", mode" EXPECT "ENOENT" +PASS +Testing open with arguments: "name, O_WRONLY" EXPECT "ENOTDIR" +PASS +Testing mkdir with arguments: "name, mode" EXPECT "ENOTDIR" +PASS +Testing close with arguments: "-1" EXPECT "EBADF" +PASS +Testing close with arguments: "100" EXPECT "EBADF" +PASS +Testing rename with arguments: "name01, name" EXPECT "EINVAL" +FAIL ../../../../../../../rtems/c/src/../../testsuites/fstests/imfs_fserror/../fserror/test.c: 156 +Testing rename with arguments: "name03, name02" EXPECT "EISDIR" +FAIL ../../../../../../../rtems/c/src/../../testsuites/fstests/imfs_fserror/../fserror/test.c: 164 +Testing rename with arguments: "nonexistence, name01" EXPECT "ENOENT" +FAIL ../../../../../../../rtems/c/src/../../testsuites/fstests/imfs_fserror/../fserror/test.c: 171 +Testing rename with arguments: "\"\", name01" EXPECT "ENOENT" +FAIL ../../../../../../../rtems/c/src/../../testsuites/fstests/imfs_fserror/../fserror/test.c: 172 +Testing rename with arguments: "name01, \"\"" EXPECT "ENOENT" +PASS +Testing rename with arguments: "name, name03" EXPECT "ENOTDIR" +FAIL ../../../../../../../rtems/c/src/../../testsuites/fstests/imfs_fserror/../fserror/test.c: 182 +Testing rename with arguments: "name03, name" EXPECT "ENOTDIR" +PASS +Testing rename with arguments: "name02, name03" EXPECT "ENOTDIR" +FAIL ../../../../../../../rtems/c/src/../../testsuites/fstests/imfs_fserror/../fserror/test.c: 184 +Testing truncate with arguments: "file, -1" EXPECT "EINVAL" +PASS +Testing rmdir with arguments: "\"..\"" EXPECT "ENOTEMPTY" +PASS +Testing rmdir with arguments: "\"tmp\"" EXPECT "ENOTEMPTY" +PASS +Testing rmdir with arguments: "\".\"" EXPECT "EINVAL" +PASS +Testing rmdir with arguments: "\"tmp/.\"" EXPECT "EINVAL" +PASS +Testing rmdir with arguments: "\"\"" EXPECT "ENOENT" +PASS +Testing rmdir with arguments: "nonexistence" EXPECT "ENOENT" +PASS +Testing unlink with arguments: "\"\"" EXPECT "ENOENT" +PASS +Testing unlink with arguments: "nonexistence" EXPECT "ENOENT" +PASS +Testing rmdir with arguments: "\"tmp/file\"" EXPECT "ENOTDIR" +PASS +Testing unlink with arguments: "\"tmp/file/dir\"" EXPECT "ENOTDIR" +PASS +Testing read with arguments: "fd, readbuf, 10" EXPECT "EBADF" +PASS +Testing read with arguments: "100, readbuf, 10" EXPECT "EBADF" +PASS +Testing write with arguments: "fd, databuf, 10" EXPECT "EBADF" +PASS +Testing write with arguments: "fd, readbuf, 10" EXPECT "EBADF" +PASS +Testing lseek with arguments: "fd, -100, SEEK_END" EXPECT "EINVAL" +PASS +Testing lseek with arguments: "fd, -100, SEEK_CUR" EXPECT "EINVAL" +PASS +Testing lseek with arguments: "fd, -100, SEEK_SET" EXPECT "EINVAL" +PASS +Testing lseek with arguments: "fd, huge, SEEK_END" EXPECT "EOVERFLOW" +PASS +Testing lseek with arguments: "fd, huge, SEEK_CUR" EXPECT "EOVERFLOW" +PASS +Testing lseek with arguments: "fd, 0, SEEK_SET" EXPECT "EBADF" +PASS +*** END OF ERROR TEST *** + + +Shutting down filesystem IMFS +*** END OF FILE SYSTEM TEST ( IMFS ) *** diff --git a/testsuites/fstests/imfs_fslink/imfs_fslink.scn b/testsuites/fstests/imfs_fslink/imfs_fslink.scn new file mode 100644 index 0000000000..7850d63b59 --- /dev/null +++ b/testsuites/fstests/imfs_fslink/imfs_fslink.scn @@ -0,0 +1,15 @@ +*** FILE SYSTEM TEST ( IMFS ) *** +Initializing filesystem IMFS + + +*** LINK TEST *** +link creates hardlinks +test if the stat is the same +chmod and chown +unlink then stat the file +*** END OF LINK TEST *** + + +Shutting down filesystem IMFS +*** END OF FILE SYSTEM TEST ( IMFS ) *** + diff --git a/testsuites/fstests/imfs_fspatheval/imfs_fspathenval.scn b/testsuites/fstests/imfs_fspatheval/imfs_fspathenval.scn new file mode 100644 index 0000000000..1fb40cefff --- /dev/null +++ b/testsuites/fstests/imfs_fspatheval/imfs_fspathenval.scn @@ -0,0 +1,81 @@ +*** FILE SYSTEM TEST ( IMFS ) *** +Initializing filesystem IMFS + + +*** PATH EVALUATION TEST *** +Making directory /test1/ +Making directory tets2 +Making directory ///test3 +Making directory test4//// +Making directory ../../test5 +Making directory /test1/../test6 +Making directory ./test7/ +Making directory .././test8 +Making directory test8/./../test9 +Making directory ///test9/../test10 + +Making directory !#$%&()-@^_`{}~' +Making directory 0_1_A +Making directory aaa bbb +Making directory ccc....ddd +Making directory fff + +Removing directory test10 +Removing directory test9 +Removing directory test8 +Removing directory test7 +Removing directory test6 +Removing directory test5 +Removing directory test4 +Removing directory test3 +Removing directory tets2 +Removing directory test1 + +Removing directory fff +Removing directory ccc....ddd +Removing directory aaa bbb +Removing directory 0_1_A +Removing directory !#$%&()-@^_`{}~' + +Create file /test1 +Create file tets2 +Create file ///test3 +Create file test4 +Create file ../../test5 +Create file /../test6 +Create file ./test7 +Create file .././test8 +Create file /./../test9 +Create file //../test10 + +Create file !#$%&()-@^_`{}~' +Create file 0_1_A +Create file aaa bbb +Create file ccc....ddd +Create file fff + +Removing file test10 +Removing file test9 +Removing file test8 +Removing file test7 +Removing file test6 +Removing file test5 +Removing file test4 +Removing file test3 +Removing file tets2 +Removing file test1 + +Removing file fff +Removing file ccc....ddd +Removing file aaa bbb +Removing file 0_1_A +Removing file !#$%&()-@^_`{}~' + +mkdir /tmp/a/b +cd /tmp +*** END OF PATH EVALUATION TEST *** + + +Shutting down filesystem IMFS +*** END OF FILE SYSTEM TEST ( IMFS ) *** + diff --git a/testsuites/fstests/imfs_fspermission/imfs_fspermission.scn b/testsuites/fstests/imfs_fspermission/imfs_fspermission.scn new file mode 100644 index 0000000000..87120ea5f7 --- /dev/null +++ b/testsuites/fstests/imfs_fspermission/imfs_fspermission.scn @@ -0,0 +1,52 @@ +*** FILE SYSTEM TEST ( IMFS ) *** +Initializing filesystem IMFS + + +*** PERMISSION TEST *** +The previous cmask is 022 +The file mode of file01 is 755 +The file mode of file02 is 755 +The file mode of dir01 is 755 +The previous cmask is 321 +The file mode of file01 is 456 +The file mode of file02 is 456 +The file mode of dir01 is 456 +The file mode of file01 is 777 +The file mode of file02 is 240 +The file mode of dir01 is 340 +Testing open with arguments: "file02,O_RDONLY" EXPECT "EACCES" +PASS +Testing open with arguments: "file02,O_RDWR" EXPECT "EACCES" +PASS +Change euid and check +Testing open with arguments: "file02,O_WRONLY" EXPECT "EACCES" +PASS +Testing open with arguments: "file02,O_RDWR" EXPECT "EACCES" +PASS +Testing creat with arguments: "path,mode" EXPECT "EACCES" +PASS +Testing rename with arguments: "path,\"test\"" EXPECT "EACCES" +PASS +Testing truncate with arguments: "path,0" EXPECT "EACCES" +PASS +Testing link with arguments: "path,\"test\"" EXPECT "EACCES" +PASS +Testing unlink with arguments: "path" EXPECT "EACCES" +PASS +Change egid and check +Testing open with arguments: "file02,O_WRONLY" EXPECT "EACCES" +PASS +Testing open with arguments: "file02,O_RDONLY" EXPECT "EACCES" +PASS +Testing open with arguments: "file02,O_RDWR" EXPECT "EACCES" +PASS +Testing creat with arguments: "path,mode" EXPECT "EACCES" +PASS +The directory file mode is 777 +The directory file mode is 321 +*** END OF PERMISSION TEST *** + + +Shutting down filesystem IMFS +*** END OF FILE SYSTEM TEST ( IMFS ) *** + diff --git a/testsuites/fstests/imfs_fsrdwr/imfs_fsrdwr.scn b/testsuites/fstests/imfs_fsrdwr/imfs_fsrdwr.scn new file mode 100644 index 0000000000..d0bef8e204 --- /dev/null +++ b/testsuites/fstests/imfs_fsrdwr/imfs_fsrdwr.scn @@ -0,0 +1,22 @@ +*** FILE SYSTEM TEST ( IMFS ) *** +Initializing filesystem IMFS +test case: read_write_test +test case: lseek_test +Create a new file +Writing 2430 bytes to file +Successfully wrote 2430 +Check the current position +2431 +test case: truncate_test03 +test case: truncate_to_zero +test case: block_read_and_write +test case: block_rw_case_0 +test case: block_rw_case_1 +test case: block_rw_case_2 +test case: block_rw_case_3 +test case: block_rw_case_4 + + +Shutting down filesystem IMFS +*** END OF FILE SYSTEM TEST ( IMFS ) *** + diff --git a/testsuites/fstests/imfs_fstime/imfs_fstime.scn b/testsuites/fstests/imfs_fstime/imfs_fstime.scn new file mode 100644 index 0000000000..845df58044 --- /dev/null +++ b/testsuites/fstests/imfs_fstime/imfs_fstime.scn @@ -0,0 +1,12 @@ +*** FILE SYSTEM TEST ( IMFS ) *** +Initializing filesystem IMFS + + +*** TIME TEST *** +Sleep a few seconds +*** END OF TIME TEST *** + + +Shutting down filesystem IMFS +*** END OF FILE SYSTEM TEST ( IMFS ) *** + -- cgit v1.2.3