diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-06-08 14:06:42 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-06-08 14:06:42 +0000 |
commit | dd4df85bbb7c933ebbdea5ed0f806447869ccfd7 (patch) | |
tree | 6ce588a0bce4eee4e165ae5c2129b88b2c5bed17 /testsuites | |
parent | 2010-06-08 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff) | |
download | rtems-dd4df85bbb7c933ebbdea5ed0f806447869ccfd7.tar.bz2 |
2010-06-08 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* spfifo01/init.c, spfifo01/spfifo01.scn: Update for IMFS API changes.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/ChangeLog | 4 | ||||
-rw-r--r-- | testsuites/sptests/spfifo01/init.c | 64 | ||||
-rw-r--r-- | testsuites/sptests/spfifo01/spfifo01.scn | 34 |
3 files changed, 23 insertions, 79 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index c5de38d12a..57ca9ddec0 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,9 @@ 2010-06-08 Sebastian Huber <Sebastian.Huber@embedded-brains.de> + * spfifo01/init.c, spfifo01/spfifo01.scn: Update for IMFS API changes. + +2010-06-08 Sebastian Huber <Sebastian.Huber@embedded-brains.de> + * spmkdir/.cvsignore, spmkdir/Makefile.am, spmkdir/init.c, spmkdir/spmkdir.doc, spmkdir/spmkdir.scn: New files. * Makefile.am, configure.ac: Reflect changes above. diff --git a/testsuites/sptests/spfifo01/init.c b/testsuites/sptests/spfifo01/init.c index 45add5455c..3477da6ae4 100644 --- a/testsuites/sptests/spfifo01/init.c +++ b/testsuites/sptests/spfifo01/init.c @@ -9,74 +9,40 @@ * $Id$ */ -/* Includes */ -#include <bsp.h> -#include <tmacros.h> -#include <stdio.h> -#include <sys/types.h> #include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> -#include <errno.h> +#include <stdio.h> -#include <rtems.h> -#include <rtems/libio.h> +#include "tmacros.h" +#define FIFO_PATH "/fifo01" -void test_main(void) +static void test_main(void) { - int status = -1; - int fd = 0; puts("\n\n*** FIFO / PIPE OPEN TEST - 1 ***"); - puts( -"\n\nConfiguration: Pipes not enabled" - ); - - puts("\n\nCreating directory /tmp"); - status = mkdir("/tmp", 0777); - rtems_test_assert(status == 0); - puts("\n\nCreating fifo /tmp/fifo"); - status = mkfifo("/tmp/fifo01", 0777); - rtems_test_assert(status == 0); - - puts("\n\nAttempt to open the fifo file\n"); puts( - "Must result in failure since \ -pipes are not enabled in the configuration" - ); - - fd = open("/tmp/fifo01", O_RDONLY); - rtems_test_assert(fd == -1); - rtems_test_assert(errno == EINTR); // Should this - // be ENOMEM? - puts("\n\nRemove the entry /tmp/fifo01"); - status = unlink("/tmp/fifo01"); - rtems_test_assert(status == 0); - - puts("\n\nRemove directory /tmp"); - status = rmdir("/tmp"); - rtems_test_assert(status == 0); - - puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 1 ***"); + "Configuration: Pipes disabled.\n" + "Creating named fifo '" FIFO_PATH "'.\n" + "Must result in failure since pipes are disabled in the configuration." + ); + status = mkfifo(FIFO_PATH, 0777); + rtems_test_assert(status == -1); + + puts("*** END OF FIFO / PIPE OPEN TEST - 1 ***"); } - -rtems_task Init( - rtems_task_argument not_used -) +rtems_task Init(rtems_task_argument not_used) { test_main(); rtems_test_exit(0); } +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_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 @@ -85,5 +51,3 @@ rtems_task Init( #define CONFIGURE_INIT #include <rtems/confdefs.h> - -/* end of file */ diff --git a/testsuites/sptests/spfifo01/spfifo01.scn b/testsuites/sptests/spfifo01/spfifo01.scn index f62e9b738c..66543c6cee 100644 --- a/testsuites/sptests/spfifo01/spfifo01.scn +++ b/testsuites/sptests/spfifo01/spfifo01.scn @@ -1,29 +1,5 @@ -Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory -Initialized console on port COM1 9600-8-N-1 -
-
-
-*** FIFO / PIPE OPEN TEST - 1 ***
-
-
-Configuration: Pipes not enabled
-
-
-Creating directory /tmp
-
-
-Creating fifo /tmp/fifo
-
-
-Attempt to open the fifo file
-
-Must result in failure since pipes are not enabled in the configuration
-
-
-Remove the entry /tmp/fifo01
-
-
-Remove directory /tmp
-
-
-*** END OF FIFO / PIPE OPEN TEST - 1 ***
+*** FIFO / PIPE OPEN TEST - 1 *** +Configuration: Pipes disabled. +Creating named fifo '/fifo01'. +Must result in failure since pipes are disabled in the configuration. +*** END OF FIFO / PIPE OPEN TEST - 1 *** |