Fix a cache bin test

This commit is contained in:
Yinan Zhang 2020-10-22 14:56:15 -07:00
parent 566c4a8594
commit 4a65f34930

View File

@ -186,7 +186,7 @@ TEST_BEGIN(test_cache_bin) {
ncached_max / 2); ncached_max / 2);
/* Try to fill some, succeed partially. */ /* Try to fill some, succeed partially. */
do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max / 2, do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max / 2,
ncached_max / 2); ncached_max / 4);
/* Try to fill some, fail completely. */ /* Try to fill some, fail completely. */
do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max / 2, 0); do_fill_test(&bin, &info, ptrs, ncached_max, ncached_max / 2, 0);
@ -196,6 +196,8 @@ TEST_BEGIN(test_cache_bin) {
do_flush_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 2); do_flush_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 2);
do_flush_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 4); do_flush_test(&bin, &info, ptrs, ncached_max / 2, ncached_max / 4);
do_flush_test(&bin, &info, ptrs, ncached_max / 2, 0); do_flush_test(&bin, &info, ptrs, ncached_max / 2, 0);
free(ptrs);
} }
TEST_END TEST_END