diff options
Diffstat (limited to 'testsuites')
-rw-r--r-- | 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 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 |