]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/obj_bencher.cc: make verify error fatal 7905/head
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Thu, 3 Mar 2016 10:30:53 +0000 (11:30 +0100)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Thu, 3 Mar 2016 16:49:58 +0000 (17:49 +0100)
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 <piotr.dalek@ts.fujitsu.com>
(cherry picked from commit 658bba85c488a38e25bc598637258c263f711631)

src/common/obj_bencher.cc

index 3772eb865781fa97fe285266c3371fe5e3d5d452..ae04a52a9524879dfe0851c5229744ad244b9e34 100644 (file)
@@ -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();