summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psxfile01
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/tests/psxtests/psxfile01/Makefile.am6
-rw-r--r--c/src/tests/psxtests/psxfile01/main.c9
-rw-r--r--c/src/tests/psxtests/psxfile01/psxfile01.scn4
-rw-r--r--c/src/tests/psxtests/psxfile01/test.c11
4 files changed, 21 insertions, 9 deletions
diff --git a/c/src/tests/psxtests/psxfile01/Makefile.am b/c/src/tests/psxtests/psxfile01/Makefile.am
index 4cae479427..f7e47ec4f9 100644
--- a/c/src/tests/psxtests/psxfile01/Makefile.am
+++ b/c/src/tests/psxtests/psxfile01/Makefile.am
@@ -1,11 +1,9 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
-VPATH = @srcdir@
-
TEST = psxfile01
MANAGERS = all
diff --git a/c/src/tests/psxtests/psxfile01/main.c b/c/src/tests/psxtests/psxfile01/main.c
index 9f253e881b..36175c90a5 100644
--- a/c/src/tests/psxtests/psxfile01/main.c
+++ b/c/src/tests/psxtests/psxfile01/main.c
@@ -27,8 +27,13 @@ rtems_task Init(
/* configuration information */
-#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
+
+#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/c/src/tests/psxtests/psxfile01/psxfile01.scn b/c/src/tests/psxtests/psxfile01/psxfile01.scn
index 22923a2369..7d5f6d106e 100644
--- a/c/src/tests/psxtests/psxfile01/psxfile01.scn
+++ b/c/src/tests/psxtests/psxfile01/psxfile01.scn
@@ -1,4 +1,8 @@
+NOTE: If you get the following assertion, then your target does not
+have enough memory in the heap used by malloc to allocate all the
+files used during this test:
+assertion "memory" failed: file "...../c/src/lib/libc/memfile.c", line 340
*** FILE TEST 1 ***
*************** Dump of Entire IMFS ***************
diff --git a/c/src/tests/psxtests/psxfile01/test.c b/c/src/tests/psxtests/psxfile01/test.c
index 3d90e6e712..d935babd9f 100644
--- a/c/src/tests/psxtests/psxfile01/test.c
+++ b/c/src/tests/psxtests/psxfile01/test.c
@@ -388,8 +388,13 @@ int main(
* triply indirect blocks.
*/
- test_extend( "/tmp/joel", max_size - 1 );
- test_cat( "/tmp/joel", max_size / 2, 1024 );
+ if ( max_size < 300 * 1024 ) {
+ test_extend( "/tmp/joel", max_size - 1 );
+ test_cat( "/tmp/joel", max_size / 2, 1024 );
+ } else {
+ printf( "Skipping maximum file size test since max_size is %d bytes\n", max_size );
+ puts("That is likely to be bigger than the available RAM on many targets." );
+ }
stat_a_file( "/tmp/joel" );
@@ -429,7 +434,7 @@ int main(
status = rtems_task_wake_after( 1 * TICKS_PER_SECOND );
rewind( file );
while ( fgets(buffer, 128, file) )
- printf( buffer );
+ printf( "%s", buffer );
/*
* Verify only atime changed for a read.