diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-01 21:15:07 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-01 21:15:07 +0000 |
commit | 3f42281e30add5748393188c81335266aa0ba946 (patch) | |
tree | 954a8f4cf5eead33bf0dab050e772dc912ba5ec7 /testsuites/psxtests/psxfile01 | |
parent | 2010-07-01 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-3f42281e30add5748393188c81335266aa0ba946.tar.bz2 |
2010-07-01 Joel Sherrill <joel.sherrilL@OARcorp.com>
* psxfile01/Makefile.am, psxfile01/psxfile01.scn, psxfile01/test.c:
Remove tests which put NULL entries in file handlers.
Diffstat (limited to 'testsuites/psxtests/psxfile01')
-rw-r--r-- | testsuites/psxtests/psxfile01/Makefile.am | 4 | ||||
-rw-r--r-- | testsuites/psxtests/psxfile01/psxfile01.scn | 50 | ||||
-rw-r--r-- | testsuites/psxtests/psxfile01/test.c | 97 |
3 files changed, 20 insertions, 131 deletions
diff --git a/testsuites/psxtests/psxfile01/Makefile.am b/testsuites/psxtests/psxfile01/Makefile.am index 519d7b81b1..4322ebb25d 100644 --- a/testsuites/psxtests/psxfile01/Makefile.am +++ b/testsuites/psxtests/psxfile01/Makefile.am @@ -2,8 +2,6 @@ ## $Id$ ## -MANAGERS = all - rtems_tests_PROGRAMS = psxfile01 psxfile01_SOURCES = main.c test.c test_cat.c test_extend.c test_write.c ../include/pmacros.h @@ -13,8 +11,6 @@ include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../automake/compile.am include $(top_srcdir)/../automake/leaf.am -psxfile01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) - AM_CPPFLAGS += -I$(top_srcdir)/include AM_CPPFLAGS += -I$(top_srcdir)/../support/include diff --git a/testsuites/psxtests/psxfile01/psxfile01.scn b/testsuites/psxtests/psxfile01/psxfile01.scn index 350bacef42..e3fc50095a 100644 --- a/testsuites/psxtests/psxfile01/psxfile01.scn +++ b/testsuites/psxtests/psxfile01/psxfile01.scn @@ -1,16 +1,15 @@ -Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory -Initialized console on port COM1 9600-8-N-1 +sparc-rtems4.11-run is /opt/rtems-4.11/bin/sparc-rtems4.11-run -
*** FILE TEST 1 *** *************** Dump of Entire IMFS *************** / ....dev/ ........console (device 0, 0) +........console_b (device 0, 1) *************** End of Dump *************** stat of /dev/console -....st_dev (0x0:0x0) +....st_dev (0xfffe:0x0) ....st_ino 3 may vary by small amount ....mode = 00020755 ....nlink = 1 @@ -70,24 +69,12 @@ attempt to rename directory joel to /imfs/test/joel - should fail with EXDEV changing dir to / attempt to rename across filesystem, with old path having a parent node attempt to rename tmp/joel to /imfs/test/joel -Unmounting /imfs -Mounting filesystem @ /imfs with no support for evalformake -change directory to /imfs -exercise _rename_r, with target on /imfs - expected ENOTSUP -attempt to rename /tmp/joel to joel -change directory to / -Mounting filesystem @ /imfs with no support for rename -creating directory /imfs/test -creating directory /imfs/test/old_dir -changing to / -attempt to rename imfs/old_dir to imfs/new_dir -unmounting /imfs End of _rename_r tests (10)the first write!!! stat( /tmp/joel ) returned -....st_dev (0x0:0x0) -....st_ino 12 may vary by small amount +....st_dev (0xfffe:0x0) +....st_ino 13 may vary by small amount ....mode = 00100700 ....nlink = 1 ....uid = 0 @@ -119,8 +106,8 @@ mknod /tmp/joel Skipping maximum file size test since max_size is 4329344 bytes That is likely to be bigger than the available RAM on many targets. stat( /tmp/joel ) returned -....st_dev (0x0:0x0) -....st_ino 13 may vary by small amount +....st_dev (0xfffe:0x0) +....st_ino 14 may vary by small amount ....mode = 00100700 ....nlink = 1 ....uid = 0 @@ -132,7 +119,7 @@ stat( /tmp/joel ) returned ....st_blocks 0 stat of /tmp/j stat(/tmp/j) returned -1 (errno=2) -....st_dev (0x0:0x0) +....st_dev (0xfffe:0x0) ....st_ino 3 may vary by small amount ....mode = 00020755 ....nlink = 1 @@ -150,8 +137,8 @@ fprintf to /tmp/j (3) 26 characters written to the file (4) 26 characters written to the file (5) 26 characters written to the file -....st_dev (0x0:0x0) -....st_ino 14 may vary by small amount +....st_dev (0xfffe:0x0) +....st_ino 15 may vary by small amount ....mode = 00100644 ....nlink = 1 ....uid = 0 @@ -166,8 +153,8 @@ This is call 2 to fprintf This is call 3 to fprintf This is call 4 to fprintf This is call 5 to fprintf -....st_dev (0x0:0x0) -....st_ino 14 may vary by small amount +....st_dev (0xfffe:0x0) +....st_ino 15 may vary by small amount ....mode = 00100644 ....nlink = 1 ....uid = 0 @@ -181,8 +168,9 @@ This is call 5 to fprintf / ....dev/ ........console (device 0, 0) +........console_b (device 0, 1) ........tty/ -............S3 (device 128, 255) +............S3 (device 255, 128) ........test_console (device 0, 0) ....etc/ ........passwd (file 0) @@ -196,8 +184,8 @@ This is call 5 to fprintf ........hidden_on_mount/ *************** End of Dump *************** truncate /tmp/j to length of 40 -....st_dev (0x0:0x0) -....st_ino 14 may vary by small amount +....st_dev (0xfffe:0x0) +....st_ino 15 may vary by small amount ....mode = 00100644 ....nlink = 1 ....uid = 0 @@ -211,8 +199,9 @@ truncate /tmp/j to length of 40 / ....dev/ ........console (device 0, 0) +........console_b (device 0, 1) ........tty/ -............S3 (device 128, 255) +............S3 (device 255, 128) ........test_console (device 0, 0) ....etc/ ........passwd (file 0) @@ -232,8 +221,9 @@ truncate /tmp to length of 0 should fail with EISDIR / ....dev/ ........console (device 0, 0) +........console_b (device 0, 1) ........tty/ -............S3 (device 128, 255) +............S3 (device 255, 128) ........test_console (device 0, 0) ....etc/ ........passwd (file 0) diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c index aa18059423..6e8fd22bb4 100644 --- a/testsuites/psxtests/psxfile01/test.c +++ b/testsuites/psxtests/psxfile01/test.c @@ -118,35 +118,6 @@ void stat_a_file( } -int no_evalformake_IMFS_initialize( - rtems_filesystem_mount_table_entry_t *mt_entry, - const void *data -) -{ - return IMFS_initialize_support( - mt_entry, - &IMFS_ops_no_evalformake, - &IMFS_memfile_handlers, - &IMFS_directory_handlers, - &IMFS_fifo_handlers - ); -} - -int no_rename_IMFS_initialize( - rtems_filesystem_mount_table_entry_t *mt_entry, - const void *data -) -{ - return IMFS_initialize_support( - mt_entry, - &IMFS_ops_no_rename, - &IMFS_memfile_handlers, - &IMFS_directory_handlers, - &IMFS_fifo_handlers - ); -} - - /* * Main entry point of the test */ @@ -176,23 +147,6 @@ int main( rtems_status_code rtems_status; rtems_time_of_day time; - IMFS_ops_no_evalformake = IMFS_ops; - IMFS_ops_no_rename = IMFS_ops; - - IMFS_ops_no_evalformake.fsmount_me_h = no_evalformake_IMFS_initialize; - IMFS_ops_no_evalformake.evalformake_h = NULL; - - IMFS_ops_no_rename.fsmount_me_h = no_rename_IMFS_initialize; - IMFS_ops_no_rename.rename_h = NULL; - - puts( "register no eval-for-make filesystem" ); - status = rtems_filesystem_register( "nefm", no_evalformake_IMFS_initialize ); - rtems_test_assert( status == 0 ); - - puts( "register no rename filesystem" ); - status = rtems_filesystem_register( "nren", no_rename_IMFS_initialize ); - rtems_test_assert( status == 0 ); - printf( "\n\n*** FILE TEST 1 ***\n" ); /* @@ -450,57 +404,6 @@ since new path is not valid"); rtems_test_assert(status == -1); rtems_test_assert(errno == EXDEV); - puts("Unmounting /imfs"); - status = unmount("/imfs"); - rtems_test_assert(status == 0); - - puts("Mounting filesystem @ /imfs with no support for evalformake"); - - status = mount("null", "/imfs", "nefm", RTEMS_FILESYSTEM_READ_WRITE, NULL); - rtems_test_assert(status == 0); - - puts("change directory to /imfs"); - status = chdir("/imfs"); - rtems_test_assert(status == 0); - - puts("exercise _rename_r, with target on /imfs - expected ENOTSUP"); - puts("attempt to rename /tmp/joel to joel"); - status = _rename_r(NULL, "/tmp/joel", "joel"); - rtems_test_assert(status == -1); - rtems_test_assert(errno == ENOTSUP); - - puts("change directory to /"); - status = chdir("/"); - rtems_test_assert(status == 0); - - status = unmount("/imfs"); - rtems_test_assert(status == 0); - - - puts("Mounting filesystem @ /imfs with no support for rename"); - status = mount("null", "/imfs", "nren", RTEMS_FILESYSTEM_READ_WRITE, NULL); - rtems_test_assert(status == 0); - - puts("creating directory /imfs/test"); - status = mkdir("/imfs/test", 0777); - rtems_test_assert(status == 0); - - puts("creating directory /imfs/test/old_dir"); - status = mkdir("/imfs/test/old_dir", 0777); - rtems_test_assert(status == 0); - - puts("changing to /"); - status = chdir("/"); - - puts("attempt to rename imfs/old_dir to imfs/new_dir"); - status = _rename_r(NULL, "imfs/test/old_dir", "imfs/test/new_dir"); - rtems_test_assert(status == -1); - rtems_test_assert(errno == ENOTSUP); - - puts("unmounting /imfs"); - status = unmount("/imfs"); - rtems_test_assert(status == 0); - puts("End of _rename_r tests"); /* |