From: Loic Dachary Date: Tue, 21 Apr 2015 14:15:15 +0000 (+0200) Subject: tests: osd-bench.sh must be verbose on failure X-Git-Tag: v9.0.1~85^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8aea730f69034d43c2e8065dd7d18632294a0de6;p=ceph.git tests: osd-bench.sh must be verbose on failure When a command fail as it should but it does not contain the expected output, display the entire output to confirm it's a false negative. http://tracker.ceph.com/issues/11441 Fixes: #11441 Signed-off-by: Loic Dachary --- diff --git a/src/test/osd/osd-bench.sh b/src/test/osd/osd-bench.sh index 3c6aa3aa6eaa..c10397589c54 100755 --- a/src/test/osd/osd-bench.sh +++ b/src/test/osd/osd-bench.sh @@ -52,24 +52,24 @@ function TEST_bench() { # # block size too high # - ! ./ceph tell osd.0 bench 1024 $((osd_bench_max_block_size + 1)) 2> $dir/out || return 1 - grep osd_bench_max_block_size $dir/out || return 1 + expect_failure $dir osd_bench_max_block_size \ + ./ceph tell osd.0 bench 1024 $((osd_bench_max_block_size + 1)) || return 1 # # count too high for small (< 1MB) block sizes # local bsize=1024 local max_count=$(($bsize * $osd_bench_duration * $osd_bench_small_size_max_iops)) - ! ./ceph tell osd.0 bench $(($max_count + 1)) $bsize 2> $dir/out || return 1 - grep osd_bench_small_size_max_iops $dir/out || return 1 + expect_failure $dir bench_small_size_max_iops \ + ./ceph tell osd.0 bench $(($max_count + 1)) $bsize || return 1 # # count too high for large (>= 1MB) block sizes # local bsize=$((1024 * 1024 + 1)) local max_count=$(($osd_bench_large_size_max_throughput * $osd_bench_duration)) - ! ./ceph tell osd.0 bench $(($max_count + 1)) $bsize 2> $dir/out || return 1 - grep osd_bench_large_size_max_throughput $dir/out || return 1 + expect_failure $dir osd_bench_large_size_max_throughput \ + ./ceph tell osd.0 bench $(($max_count + 1)) $bsize || return 1 # # default values should work