aboutsummaryrefslogtreecommitdiff
path: root/tests/test-throttle.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-throttle.c')
-rw-r--r--tests/test-throttle.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test-throttle.c b/tests/test-throttle.c
index c02be805f7..d584870950 100644
--- a/tests/test-throttle.c
+++ b/tests/test-throttle.c
@@ -398,6 +398,14 @@ static void test_max_is_missing_limit(void)
}
}
+static void test_iops_size_is_missing_limit(void)
+{
+ /* A total/read/write iops limit is required */
+ throttle_config_init(&cfg);
+ cfg.op_size = 4096;
+ g_assert(!throttle_is_valid(&cfg, NULL));
+}
+
static void test_have_timer(void)
{
/* zero structures */
@@ -653,6 +661,8 @@ int main(int argc, char **argv)
g_test_add_func("/throttle/config/conflicting", test_conflicting_config);
g_test_add_func("/throttle/config/is_valid", test_is_valid);
g_test_add_func("/throttle/config/max", test_max_is_missing_limit);
+ g_test_add_func("/throttle/config/iops_size",
+ test_iops_size_is_missing_limit);
g_test_add_func("/throttle/config_functions", test_config_functions);
g_test_add_func("/throttle/accounting", test_accounting);
g_test_add_func("/throttle/groups", test_groups);