From 96d79ba244d9b5aa1ad58ae5b724e039c3a3a5b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Da=C5=82ek?= Date: Thu, 3 Mar 2016 11:30:53 +0100 Subject: [PATCH] common/obj_bencher.cc: make verify error fatal MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When run without "--no-verify", all verification errors are noted, but they are not forwarded/reported anywhere else but to cerr, which will cause automated testing to ignore them. Make seq_read_bench and rand_read_bench return -EIO on any verification error which will, in turn, return it back to caller. Fixes: #14973 Signed-off-by: Piotr Dałek (cherry picked from commit 658bba85c488a38e25bc598637258c263f711631) --- src/common/obj_bencher.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/obj_bencher.cc b/src/common/obj_bencher.cc index 3772eb865781f..ae04a52a95248 100644 --- a/src/common/obj_bencher.cc +++ b/src/common/obj_bencher.cc @@ -777,7 +777,7 @@ int ObjBencher::seq_read_bench(int seconds_to_run, int num_objects, int concurre completions_done(); - return 0; + return (errors > 0 ? -EIO : 0); ERR: lock.Lock(); @@ -998,7 +998,7 @@ int ObjBencher::rand_read_bench(int seconds_to_run, int num_objects, int concurr } completions_done(); - return 0; + return (errors > 0 ? -EIO : 0); ERR: lock.Lock(); -- 2.39.5