summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-01-30 17:00:22 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-01-30 17:08:05 +0100
commit334222f042504d871191f7ae286689215110262a (patch)
tree53f8e2319be5bd46df5fa39744b75126b2a67541 /testsuites
parentfstests: Perform a quick format (diff)
downloadrtems-334222f042504d871191f7ae286689215110262a.tar.bz2
fstests: Initialize swapout task
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/fstests/support/ramdisk_support.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuites/fstests/support/ramdisk_support.c b/testsuites/fstests/support/ramdisk_support.c
index 339c63a6cb..17dbb67820 100644
--- a/testsuites/fstests/support/ramdisk_support.c
+++ b/testsuites/fstests/support/ramdisk_support.c
@@ -11,6 +11,9 @@
#include "config.h"
#endif
+#include <sys/stat.h>
+#include <fcntl.h>
+
#include <rtems/ramdisk.h>
#include <rtems/blkdev.h>
#include <rtems/libio.h>
@@ -25,6 +28,20 @@
dev_t dev = 0;
+static void initialize_swapout_task(void)
+{
+ int fd = open(RAMDISK_PATH, O_RDONLY);
+ int rv = 0;
+
+ rtems_test_assert(fd >= 0);
+
+ rv = rtems_disk_fd_sync(fd);
+ rtems_test_assert(rv == 0);
+
+ rv = close(fd);
+ rtems_test_assert(rv == 0);
+}
+
void
init_ramdisk (void)
{
@@ -36,6 +53,8 @@ init_ramdisk (void)
false, RAMDISK_PATH, &dev);
rtems_test_assert (rc == 0);
+
+ initialize_swapout_task();
}
void