summaryrefslogtreecommitdiffstats
path: root/testsuites/fstests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-14 20:07:19 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-14 21:34:42 +0100
commitf78549221be6d9142263b70e246ec6adf1d58ba9 (patch)
tree5a155d27479100c2f096a587b18328136a47c1a6 /testsuites/fstests
parentlpc1768_mbed_ahb_ram_eth-testsuite.tcfg: Add ftp01 (diff)
downloadrtems-f78549221be6d9142263b70e246ec6adf1d58ba9.tar.bz2
IMFS: Add CONFIGURE_IMFS_DISABLE_READDIR
Diffstat (limited to 'testsuites/fstests')
-rw-r--r--testsuites/fstests/fsimfsconfig01/init.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuites/fstests/fsimfsconfig01/init.c b/testsuites/fstests/fsimfsconfig01/init.c
index 1d449d6828..dd587fae4c 100644
--- a/testsuites/fstests/fsimfsconfig01/init.c
+++ b/testsuites/fstests/fsimfsconfig01/init.c
@@ -19,6 +19,7 @@
#include "tmacros.h"
#include <sys/stat.h>
+#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -46,6 +47,9 @@ static void Init(rtems_task_argument arg)
const char *fifo = "fifo";
int rv;
int fd;
+ DIR *dirp;
+ struct dirent *dire;
+ struct stat st;
TEST_BEGIN();
@@ -88,6 +92,21 @@ static void Init(rtems_task_argument arg)
rtems_test_assert(rv == -1);
rtems_test_assert(errno == ENOSYS);
+ dirp = opendir(mnt);
+ rtems_test_assert(dirp != NULL);
+
+ errno = 0;
+ dire = readdir(dirp);
+ rtems_test_assert(dire == NULL);
+ rtems_test_assert(errno == ENOTSUP);
+
+ rv = closedir(dirp);
+ rtems_test_assert(rv == 0);
+
+ rv = stat(mnt, &st);
+ rtems_test_assert(rv == 0);
+ rtems_test_assert(st.st_size == 0);
+
errno = 0;
rv = mount(
"",
@@ -145,6 +164,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_IMFS_DISABLE_MKNOD_FILE
#define CONFIGURE_IMFS_DISABLE_MOUNT
#define CONFIGURE_IMFS_DISABLE_RENAME
+#define CONFIGURE_IMFS_DISABLE_READDIR
#define CONFIGURE_IMFS_DISABLE_RMNOD
#define CONFIGURE_IMFS_DISABLE_SYMLINK
#define CONFIGURE_IMFS_DISABLE_UTIME