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 <ldachary@redhat.com>
This commit is contained in:
Loic Dachary 2015-04-21 16:15:15 +02:00
parent 14cb7b8f59
commit 8aea730f69

View File

@ -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