From 334222f042504d871191f7ae286689215110262a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 30 Jan 2013 17:00:22 +0100 Subject: fstests: Initialize swapout task --- testsuites/fstests/support/ramdisk_support.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'testsuites') 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 +#include + #include #include #include @@ -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 -- cgit v1.2.3