f3probe: relax cache size comparision in unit test

This commit is contained in:
Michel Machado 2015-11-16 12:49:18 -05:00
parent 3d04fc7b55
commit e7769bb77d

View File

@ -289,11 +289,10 @@ static int unit_test(const char *filename)
if (real_size_byte == item->real_size_byte &&
announced_size_byte == item->fake_size_byte &&
wrap == item->wrap &&
/* We don't compare cache size because
* probe_device() only returns an estimate.
* item_cache_byte ==
* (cache_size_block << block_order) &&
/* probe_device() returns an upper bound of
* the cache size.
*/
item_cache_byte <= (cache_size_block << block_order) &&
!need_reset &&
block_order == item->block_order) {
success++;