summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-20 13:30:43 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-21 10:50:04 +0100
commit71cf3e9d2f67f8c73abf8677ed92cbcc4008928d (patch)
tree807f793fbfb83e0ccb561cee2424cecc9832bcd2 /testsuites
parentbsp/gen5200: New ATA driver (diff)
downloadrtems-71cf3e9d2f67f8c73abf8677ed92cbcc4008928d.tar.bz2
libblock: Do resource allocation in one place
All resource allocations take place in rtems_bdbuf_init() now. After rtems_bdbuf_init() no fatal errors can happen due to configuration errors or resource limits. This makes it easier to detect configuration errors for users.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/fstests/fsbdpart01/init.c16
-rw-r--r--testsuites/fstests/support/ramdisk_support.c17
2 files changed, 0 insertions, 33 deletions
diff --git a/testsuites/fstests/fsbdpart01/init.c b/testsuites/fstests/fsbdpart01/init.c
index aea0da08d1..bf6719cd20 100644
--- a/testsuites/fstests/fsbdpart01/init.c
+++ b/testsuites/fstests/fsbdpart01/init.c
@@ -100,20 +100,6 @@ static void test_logical_disks(const char *const *rdax, bool exists)
}
}
-static void initialize_swapout_task(void)
-{
- int fd = open(rda, 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);
-}
-
static void test_bdpart(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -128,8 +114,6 @@ static void test_bdpart(void)
memset(&actual_format, 0, sizeof(actual_format));
memset(&actual_partitions [0], 0, sizeof(actual_partitions));
- initialize_swapout_task();
-
rtems_resource_snapshot_take(&before);
for (i = 0; i < PARTITION_COUNT; ++i) {
diff --git a/testsuites/fstests/support/ramdisk_support.c b/testsuites/fstests/support/ramdisk_support.c
index 17dbb67820..0b6b50d386 100644
--- a/testsuites/fstests/support/ramdisk_support.c
+++ b/testsuites/fstests/support/ramdisk_support.c
@@ -28,20 +28,6 @@
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)
{
@@ -52,9 +38,6 @@ init_ramdisk (void)
rc = ramdisk_register (RAMDISK_BLOCK_SIZE, RAMDISK_BLOCK_COUNT,
false, RAMDISK_PATH, &dev);
rtems_test_assert (rc == 0);
-
-
- initialize_swapout_task();
}
void