diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-21 15:52:55 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-13 12:24:15 +0100 |
commit | e00cca9b74acb6ec67cc9696cd0a005aa3d991c3 (patch) | |
tree | 340910f0585a73cfb6afb693a88fad2470c9acf3 /testsuites | |
parent | Filesystem: Rename defines (diff) | |
download | rtems-e00cca9b74acb6ec67cc9696cd0a005aa3d991c3.tar.bz2 |
IMFS: Do not check for unsupported types
Allow creation of nodes with an unsupported type. Later the usage of
such nodes will return an error status.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/spfifo01/init.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/testsuites/sptests/spfifo01/init.c b/testsuites/sptests/spfifo01/init.c index dc5f9750b4..71d2369220 100644 --- a/testsuites/sptests/spfifo01/init.c +++ b/testsuites/sptests/spfifo01/init.c @@ -15,6 +15,9 @@ #include <sys/stat.h> #include <stdio.h> +#include <fcntl.h> +#include <errno.h> +#include <unistd.h> #include "tmacros.h" @@ -23,6 +26,9 @@ static void test_main(void) { int status = -1; + int fd; + char buf [1]; + ssize_t n; puts("\n\n*** FIFO / PIPE OPEN TEST - 1 ***"); @@ -32,7 +38,21 @@ static void test_main(void) "Must result in failure since pipes are disabled in the configuration." ); status = mkfifo(FIFO_PATH, 0777); - rtems_test_assert(status == -1); + rtems_test_assert(status == 0); + + fd = open(FIFO_PATH, O_RDWR); + rtems_test_assert(fd >= 0); + + n = read(fd, buf, sizeof(buf)); + rtems_test_assert(n == -1); + rtems_test_assert(errno == ENOTSUP); + + n = write(fd, buf, sizeof(buf)); + rtems_test_assert(n == -1); + rtems_test_assert(errno == ENOTSUP); + + status = close(fd); + rtems_test_assert(status == 0); puts("*** END OF FIFO / PIPE OPEN TEST - 1 ***"); } @@ -48,6 +68,8 @@ rtems_task Init(rtems_task_argument not_used) #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4 + #define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |