From 8aea730f69034d43c2e8065dd7d18632294a0de6 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 21 Apr 2015 16:15:15 +0200 Subject: [PATCH] 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 --- src/test/osd/osd-bench.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/osd/osd-bench.sh b/src/test/osd/osd-bench.sh index 3c6aa3aa6eaa5..c10397589c545 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 -- 2.39.5