[rtems commit] fstests: Initialize swapout task
Sebastian Huber
sebh at rtems.org
Wed Jan 30 16:03:40 UTC 2013
Module: rtems
Branch: master
Commit: 334222f042504d871191f7ae286689215110262a
Changeset: http://git.rtems.org/rtems/commit/?id=334222f042504d871191f7ae286689215110262a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jan 30 17:00:22 2013 +0100
fstests: Initialize swapout task
---
testsuites/fstests/support/ramdisk_support.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/testsuites/fstests/support/ramdisk_support.c b/testsuites/fstests/support/ramdisk_support.c
index 339c63a..17dbb67 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
More information about the vc
mailing list