summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxfile01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-12-31 10:56:05 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-27 06:54:22 +0100
commitcf36b70e8dd8755e7dac6eb516169f586e78566d (patch)
tree97200818ec5dfeaa4e137a572fcbb4db746842b1 /testsuites/psxtests/psxfile01
parentuser/conf.t: Fix typo (diff)
downloadrtems-cf36b70e8dd8755e7dac6eb516169f586e78566d.tar.bz2
IMFS: Replace node union with individual struct
This reduces the average node size. Add and use IMFS_GENERIC_INITIALIZER().
Diffstat (limited to 'testsuites/psxtests/psxfile01')
-rw-r--r--testsuites/psxtests/psxfile01/psxfile01.scn75
-rw-r--r--testsuites/psxtests/psxfile01/test.c14
2 files changed, 6 insertions, 83 deletions
diff --git a/testsuites/psxtests/psxfile01/psxfile01.scn b/testsuites/psxtests/psxfile01/psxfile01.scn
index 5cdd609613..605fef176e 100644
--- a/testsuites/psxtests/psxfile01/psxfile01.scn
+++ b/testsuites/psxtests/psxfile01/psxfile01.scn
@@ -1,11 +1,4 @@
-*** FILE TEST 1 ***
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console_a (device 0, 0)
-........console (device 0, 0)
-........console_b (device 0, 1)
-*************** End of Dump ***************
+*** BEGIN OF TEST PSXFILE 1 ***
stat of /dev/console
....st_dev (0xfffe:0x0)
....st_rdev (0x0:0x0)
@@ -181,26 +174,6 @@ This is call 5 to fprintf
....ctime = Sat Dec 31 09:00:00 1988
....st_blksize 80
....st_blocks 0
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console_a (device 0, 0)
-........console (device 0, 0)
-........console_b (device 0, 1)
-........tty/
-............S3 (device 255, 128)
-........test_console (device 0, 0)
-....etc/
-........passwd (file 0)
-....tmp/
-........my_dir/
-........tom (file 0)
-........john (file 0)
-........joel (file 533)
-........j (file 130)
-....imfs/
-........hidden_on_mount/
-*************** End of Dump ***************
truncate /tmp/j to length of 40
....st_dev (0xfffe:0x0)
....st_rdev (0x0:0x0)
@@ -209,53 +182,15 @@ truncate /tmp/j to length of 40
....nlink = 1
....uid = 0
....gid = 0
-....atime = Sat Dec 31 09:00:02 1988
-....mtime = Sat Dec 31 09:00:00 1988
-....ctime = Sat Dec 31 09:00:00 1988
+....atime = Sat Dec 31 09:00:01 1988
+....mtime = Sat Dec 31 09:00:02 1988
+....ctime = Sat Dec 31 09:00:02 1988
....st_blksize 80
....st_blocks 0
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console_a (device 0, 0)
-........console (device 0, 0)
-........console_b (device 0, 1)
-........tty/
-............S3 (device 255, 128)
-........test_console (device 0, 0)
-....etc/
-........passwd (file 0)
-....tmp/
-........my_dir/
-........tom (file 0)
-........john (file 0)
-........j (file 40)
-....imfs/
-........hidden_on_mount/
-*************** End of Dump ***************
truncate /tmp/j to length of 0
truncate /tmp to length of 0 should fail with EISDIR
21: Is a directory
-*************** Dump of Entire IMFS ***************
-/
-....dev/
-........console_a (device 0, 0)
-........console (device 0, 0)
-........console_b (device 0, 1)
-........tty/
-............S3 (device 255, 128)
-........test_console (device 0, 0)
-....etc/
-........passwd (file 0)
-....tmp/
-........my_dir/
-........tom (file 0)
-........john (file 0)
-........j (file 0)
-....imfs/
-........hidden_on_mount/
-*************** End of Dump ***************
Writing First File
Writing Second File
(0)this is a test line
@@ -264,4 +199,4 @@ this is a test line
(0)this is a test line
this is a test line
-*** END OF FILE TEST 1 ***
+*** END OF TEST PSXFILE 1 ***
diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c
index 94f80c8b2e..abc9295053 100644
--- a/testsuites/psxtests/psxfile01/test.c
+++ b/testsuites/psxtests/psxfile01/test.c
@@ -166,19 +166,13 @@ int main(
* Grab the maximum size of an in-memory file.
*/
- max_size = IMFS_memfile_maximum_size();
+ max_size = IMFS_MEMFILE_MAXIMUM_SIZE;
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
rtems_status = rtems_clock_set( &time );
directive_failed( rtems_status, "clock set" );
/*
- * Dump an empty file system
- */
-
- IMFS_dump();
-
- /*
* Simple stat() of /dev/console.
*/
@@ -605,8 +599,6 @@ since new path is not valid");
rtems_test_assert( mtime1 == mtime2);
rtems_test_assert( ctime1 == ctime2);
- IMFS_dump();
-
unlink( "/tmp/joel" );
/*
@@ -631,8 +623,6 @@ since new path is not valid");
rtems_test_assert( mtime1 != mtime2);
rtems_test_assert( ctime1 != ctime2);
- IMFS_dump();
-
/* try to truncate the console and see what happens */
status = truncate( "/dev/console", 40 );
rtems_test_assert( status == 0 );
@@ -647,8 +637,6 @@ since new path is not valid");
printf( "%d: %s\n", errno, strerror( errno ) );
rtems_test_assert( errno == EISDIR );
- IMFS_dump();
-
status = truncate( "/tmp/fred", 10 );
rtems_test_assert( status == -1);