diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-02-13 20:53:41 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-02-13 20:53:41 +0100 |
commit | 12eee4fdb5ff2b103d8f316509c590b3325e96a7 (patch) | |
tree | f7661a3377de980df55e436d8acea3f831ba5931 /testsuites/fstests/fsimfsconfig01/init.c | |
parent | sapi/Makefile.am: Do not install libsapi.a (diff) | |
download | rtems-12eee4fdb5ff2b103d8f316509c590b3325e96a7.tar.bz2 |
IMFS: CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
Resurrect CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM.
Diffstat (limited to 'testsuites/fstests/fsimfsconfig01/init.c')
-rw-r--r-- | testsuites/fstests/fsimfsconfig01/init.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/testsuites/fstests/fsimfsconfig01/init.c b/testsuites/fstests/fsimfsconfig01/init.c index 3f842c0451..e14ca8d5d8 100644 --- a/testsuites/fstests/fsimfsconfig01/init.c +++ b/testsuites/fstests/fsimfsconfig01/init.c @@ -20,6 +20,7 @@ #include <sys/stat.h> #include <errno.h> +#include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <utime.h> @@ -40,7 +41,11 @@ static void Init(rtems_task_argument arg) struct utimbuf times; const char *generic = "generic"; const char *mnt = "mnt"; + const char *dev = "device"; + const char *file = "file"; + const char *fifo = "fifo"; int rv; + int fd; TEST_BEGIN(); @@ -70,6 +75,20 @@ static void Init(rtems_task_argument arg) rv = mkdir(mnt, S_IRWXU); rtems_test_assert(rv == 0); + rv = mknod(dev, S_IFCHR | S_IRWXU, 0); + rtems_test_assert(rv == 0); + + fd = creat(file, S_IRWXU); + rtems_test_assert(fd == 3); + + rv = close(fd); + rtems_test_assert(rv == 0); + + errno = 0; + rv = mkfifo(fifo, S_IRWXU); + rtems_test_assert(rv == -1); + rtems_test_assert(errno == ENOSYS); + errno = 0; rv = mount( "", @@ -87,17 +106,17 @@ static void Init(rtems_task_argument arg) rtems_test_assert(errno == ENOTSUP); errno = 0; - rv = unlink(generic); + rv = symlink(generic, "link"); rtems_test_assert(rv == -1); rtems_test_assert(errno == ENOTSUP); errno = 0; - rv = symlink(generic, "link"); + rv = utime(generic, ×); rtems_test_assert(rv == -1); rtems_test_assert(errno == ENOTSUP); errno = 0; - rv = utime(generic, ×); + rv = unlink(generic); rtems_test_assert(rv == -1); rtems_test_assert(errno == ENOTSUP); @@ -108,6 +127,8 @@ static void Init(rtems_task_argument arg) #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4 + #define CONFIGURE_FILESYSTEM_IMFS #define CONFIGURE_IMFS_DISABLE_CHOWN |