Lines Matching refs:ts

30 static ThrottleState  ts;  variable
162 memset(&ts, 1, sizeof(ts)); in test_init()
166 throttle_init(&ts); in test_init()
168 read_timer_cb, write_timer_cb, &ts); in test_init()
176 g_assert(!ts.previous_leak); in test_init()
177 g_assert(!ts.cfg.op_size); in test_init()
179 g_assert(!ts.cfg.buckets[i].avg); in test_init()
180 g_assert(!ts.cfg.buckets[i].max); in test_init()
181 g_assert(!ts.cfg.buckets[i].level); in test_init()
194 memset(&ts, 1, sizeof(ts)); in test_init_readonly()
198 throttle_init(&ts); in test_init_readonly()
200 read_timer_cb, NULL, &ts); in test_init_readonly()
208 g_assert(!ts.previous_leak); in test_init_readonly()
209 g_assert(!ts.cfg.op_size); in test_init_readonly()
211 g_assert(!ts.cfg.buckets[i].avg); in test_init_readonly()
212 g_assert(!ts.cfg.buckets[i].max); in test_init_readonly()
213 g_assert(!ts.cfg.buckets[i].level); in test_init_readonly()
226 memset(&ts, 1, sizeof(ts)); in test_init_writeonly()
230 throttle_init(&ts); in test_init_writeonly()
232 NULL, write_timer_cb, &ts); in test_init_writeonly()
240 g_assert(!ts.previous_leak); in test_init_writeonly()
241 g_assert(!ts.cfg.op_size); in test_init_writeonly()
243 g_assert(!ts.cfg.buckets[i].avg); in test_init_writeonly()
244 g_assert(!ts.cfg.buckets[i].max); in test_init_writeonly()
245 g_assert(!ts.cfg.buckets[i].level); in test_init_writeonly()
254 throttle_init(&ts); in test_destroy()
256 read_timer_cb, write_timer_cb, &ts); in test_destroy()
295 throttle_init(&ts); in test_config_functions()
297 read_timer_cb, write_timer_cb, &ts); in test_config_functions()
299 g_assert(!ts.previous_leak); in test_config_functions()
300 throttle_config(&ts, QEMU_CLOCK_VIRTUAL, &orig_cfg); in test_config_functions()
303 g_assert(ts.previous_leak); in test_config_functions()
306 throttle_get_config(&ts, &final_cfg); in test_config_functions()
565 memset(&ts, 0, sizeof(ts)); in test_have_timer()
572 throttle_init(&ts); in test_have_timer()
574 read_timer_cb, write_timer_cb, &ts); in test_have_timer()
585 memset(&ts, 0, sizeof(ts)); in test_detach_attach()
589 throttle_init(&ts); in test_detach_attach()
591 read_timer_cb, write_timer_cb, &ts); in test_detach_attach()
633 throttle_init(&ts); in do_test_accounting()
635 read_timer_cb, write_timer_cb, &ts); in do_test_accounting()
636 throttle_config(&ts, QEMU_CLOCK_VIRTUAL, &cfg); in do_test_accounting()
639 throttle_account(&ts, THROTTLE_READ, size); in do_test_accounting()
641 throttle_account(&ts, THROTTLE_WRITE, size); in do_test_accounting()
645 if (!double_cmp(ts.cfg.buckets[index].level, total_result)) { in do_test_accounting()
651 if (!double_cmp(ts.cfg.buckets[index].level, read_result)) { in do_test_accounting()
657 if (!double_cmp(ts.cfg.buckets[index].level, write_result)) { in do_test_accounting()