From e00cca9b74acb6ec67cc9696cd0a005aa3d991c3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 21 Feb 2012 15:52:55 +0100 Subject: 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. --- testsuites/sptests/spfifo01/init.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'testsuites') 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 #include +#include +#include +#include #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 -- cgit v1.2.3