From: Piotr Dałek Date: Thu, 3 Mar 2016 10:30:53 +0000 (+0100) Subject: common/obj_bencher.cc: make verify error fatal X-Git-Tag: v0.94.7~19^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7903%2Fhead;p=ceph.git common/obj_bencher.cc: make verify error fatal 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: #14974 Signed-off-by: Piotr Dałek (cherry picked from commit 658bba85c488a38e25bc598637258c263f711631) --- diff --git a/src/common/obj_bencher.cc b/src/common/obj_bencher.cc index fbc9e3497f2..cc4da2a4b78 100644 --- a/src/common/obj_bencher.cc +++ b/src/common/obj_bencher.cc @@ -672,7 +672,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(); @@ -864,7 +864,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();