summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psxfile02
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-11-23 18:57:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-11-23 18:57:48 +0000
commit0895bdb89c1674d01ecb9886a0624096ef939ad1 (patch)
tree4bcea896c4f2ef42c786490c685bef6941be19c8 /c/src/tests/psxtests/psxfile02
parentRemoved. (diff)
downloadrtems-0895bdb89c1674d01ecb9886a0624096ef939ad1.tar.bz2
Added tests in support of the file system infrastructure.
Diffstat (limited to 'c/src/tests/psxtests/psxfile02')
-rw-r--r--c/src/tests/psxtests/psxfile02/Makefile.in63
-rw-r--r--c/src/tests/psxtests/psxfile02/main.c29
-rw-r--r--c/src/tests/psxtests/psxfile02/psxfile02.scn2
-rw-r--r--c/src/tests/psxtests/psxfile02/test.c49
4 files changed, 143 insertions, 0 deletions
diff --git a/c/src/tests/psxtests/psxfile02/Makefile.in b/c/src/tests/psxtests/psxfile02/Makefile.in
new file mode 100644
index 0000000000..f703ab3d98
--- /dev/null
+++ b/c/src/tests/psxtests/psxfile02/Makefile.in
@@ -0,0 +1,63 @@
+#
+# $Id$
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+VPATH = @srcdir@
+RTEMS_ROOT = @top_srcdir@
+PROJECT_ROOT = @PROJECT_ROOT@
+
+TEST=file02
+
+MANAGERS=all
+
+# C source names, if any, go here -- minus the .c
+C_PIECES=main test
+C_FILES=$(C_PIECES:%=%.c)
+C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
+
+H_FILES=
+
+DOCTYPES=scn
+DOCS=$(DOCTYPES:%=$(TEST).%)
+
+SRCS=$(DOCS) $(C_FILES) $(H_FILES)
+OBJS=$(C_O_FILES)
+
+PRINT_SRCS=$(DOCS)
+
+PGM=${ARCH}/$(TEST).exe
+
+include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+DEFINES +=
+CPPFLAGS +=
+CFLAGS +=
+
+LD_PATHS +=
+LD_LIBS +=
+LDFLAGS +=
+
+#
+# Add your list of files to delete here. The config files
+# already know how to delete some stuff, so you may want
+# to just run 'make clean' first to see what gets missed.
+# 'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS +=
+CLOBBER_ADDITIONS +=
+
+all: ${ARCH} $(SRCS) $(PGM)
+ $(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/tests
+ $(INSTALL) $(srcdir)/$(TEST).scn \
+ ${PROJECT_RELEASE}/tests/screens/psxtests/$(TEST).scn
+
+${PGM}: $(OBJS) $(LINK_FILES)
+ $(make-exe)
diff --git a/c/src/tests/psxtests/psxfile02/main.c b/c/src/tests/psxtests/psxfile02/main.c
new file mode 100644
index 0000000000..0e8d54fc31
--- /dev/null
+++ b/c/src/tests/psxtests/psxfile02/main.c
@@ -0,0 +1,29 @@
+/*
+ * Simple test program -- simplified version of sample test hello.
+ */
+
+#define TEST_INIT
+
+#include <bsp.h>
+
+void test_main( void );
+
+rtems_task Init(
+ rtems_task_argument ignored
+)
+{
+ test_main();
+ exit( 0 );
+}
+
+/* configuration information */
+
+#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <confdefs.h>
+
+/* end of file */
diff --git a/c/src/tests/psxtests/psxfile02/psxfile02.scn b/c/src/tests/psxtests/psxfile02/psxfile02.scn
new file mode 100644
index 0000000000..139597f9cb
--- /dev/null
+++ b/c/src/tests/psxtests/psxfile02/psxfile02.scn
@@ -0,0 +1,2 @@
+
+
diff --git a/c/src/tests/psxtests/psxfile02/test.c b/c/src/tests/psxtests/psxfile02/test.c
new file mode 100644
index 0000000000..282a8209d0
--- /dev/null
+++ b/c/src/tests/psxtests/psxfile02/test.c
@@ -0,0 +1,49 @@
+/*
+ * Simple test program to exercise some of the basic functionality of
+ * POSIX Files and Directories Support.
+ *
+ * This test assumes that the file system is initialized with the
+ * following directory structure:
+ *
+ * XXXX fill this in.
+ * /
+ * /dev
+ * /dev/XXX [where XXX includes at least console]
+ *
+ *
+ */
+
+#include <stdio.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <assert.h>
+
+/*
+ * Main entry point of the test
+ */
+
+#if defined(__rtems__)
+int test_main(void)
+#else
+int main(
+ int argc,
+ char **argv
+)
+#endif
+{
+ printf( "\n\n*** FILE TEST 2 ***\n" );
+
+ /*
+ * XXX test code goes here
+ */
+
+ printf( "*** END OF FILE TEST 2 ***\n" );
+ exit( 0 );
+}