]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: osd-bench.sh must be verbose on failure 4421/head
authorLoic Dachary <ldachary@redhat.com>
Tue, 21 Apr 2015 14:15:15 +0000 (16:15 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 21 Apr 2015 21:35:28 +0000 (23:35 +0200)
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>
src/test/osd/osd-bench.sh

index 3c6aa3aa6eaa5b8c8a9fa633b3893f60d4b3e2e7..c10397589c5455f141db5a1f7e6c4dce48e3e423 100755 (executable)
@@ -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