summaryrefslogtreecommitdiffstats
path: root/testsuites/fstests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-14 15:21:14 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 10:55:38 +0200
commitac741625b0926a0329627beca52174edd69e587b (patch)
treef8f186efe3118359ae32a4a2eeedbe79e38c340e /testsuites/fstests
parentlibio: Add hold/drop iop reference (diff)
downloadrtems-ac741625b0926a0329627beca52174edd69e587b.tar.bz2
libio: Use FIFO for iop free list
Update #3136.
Diffstat (limited to 'testsuites/fstests')
-rw-r--r--testsuites/fstests/fsclose01/init.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/testsuites/fstests/fsclose01/init.c b/testsuites/fstests/fsclose01/init.c
index a9de652b51..77df082036 100644
--- a/testsuites/fstests/fsclose01/init.c
+++ b/testsuites/fstests/fsclose01/init.c
@@ -405,6 +405,27 @@ static void worker_task(rtems_task_argument arg)
}
}
+static void test_fd_free_fifo(const char *path)
+{
+ int a;
+ int b;
+ int rv;
+
+ a = open(path, O_RDWR);
+ rtems_test_assert(a >= 0);
+
+ rv = close(a);
+ rtems_test_assert(rv == 0);
+
+ b = open(path, O_RDWR);
+ rtems_test_assert(b >= 0);
+
+ rv = close(b);
+ rtems_test_assert(rv == 0);
+
+ rtems_test_assert(a != b);
+}
+
static void test(test_context *ctx)
{
const char *path = "generic";
@@ -420,6 +441,8 @@ static void test(test_context *ctx)
);
rtems_test_assert(rv == 0);
+ test_fd_free_fifo(path);
+
sc = rtems_task_create(
rtems_build_name('W', 'O', 'R', 'K'),
1,
@@ -469,15 +492,15 @@ static void test(test_context *ctx)
rv = unlink(path);
rtems_test_assert(rv == 0);
- rtems_test_assert(ctx->close_count == 15);
+ rtems_test_assert(ctx->close_count == 17);
rtems_test_assert(ctx->fcntl_count == 1);
rtems_test_assert(ctx->fdatasync_count == 1);
- rtems_test_assert(ctx->fstat_count == 38);
+ rtems_test_assert(ctx->fstat_count == 42);
rtems_test_assert(ctx->fsync_count == 1);
rtems_test_assert(ctx->ftruncate_count == 1);
rtems_test_assert(ctx->ioctl_count == 1);
rtems_test_assert(ctx->lseek_count == 1);
- rtems_test_assert(ctx->open_count == 15);
+ rtems_test_assert(ctx->open_count == 17);
rtems_test_assert(ctx->read_count == 1);
rtems_test_assert(ctx->readv_count == 1);
rtems_test_assert(ctx->write_count == 1);
@@ -495,7 +518,7 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
#define CONFIGURE_MAXIMUM_TASKS 2