From e7769bb77d1f91dc6d4e3137e229a57ccfacb8af Mon Sep 17 00:00:00 2001 From: Michel Machado Date: Mon, 16 Nov 2015 12:49:18 -0500 Subject: [PATCH] f3probe: relax cache size comparision in unit test --- f3probe.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/f3probe.c b/f3probe.c index c4fbfab..f68533e 100644 --- a/f3probe.c +++ b/f3probe.c @@ -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++;