]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/test_rados_tool.sh: implement regression test for bench verify crash 5853/head
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Tue, 29 Sep 2015 07:12:03 +0000 (09:12 +0200)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Tue, 29 Sep 2015 07:12:03 +0000 (09:12 +0200)
Truncate all objects after format test, then check whether rados bench rand/seq
still works, or just crashes.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
src/test/test_rados_tool.sh

index bf51072f30bf3e65ed4d55a07c42041b847b0189..86b7f9362b18e7a2c78c780d41c35cdd40a1abb8 100755 (executable)
@@ -38,6 +38,12 @@ run_expect_succ() {
     [ $? -ne 0 ] && die "expected success, but got failure! cmd: $@"
 }
 
+run_expect_nosignal() {
+    echo "RUN_EXPECT_NOSIGNAL: " "$@"
+    do_run "$@"
+    [ $? -ge 128 ] && die "expected succes or fail, but got signal! cmd: $@"
+}
+
 run() {
     echo "RUN: " $@
     do_run "$@"
@@ -225,6 +231,12 @@ run_expect_succ "$RADOS_TOOL" --pool "$POOL" bench 5 write --format json --no-cl
 run_expect_succ "$RADOS_TOOL" --pool "$POOL" bench 1 rand --format json
 run_expect_succ "$RADOS_TOOL" --pool "$POOL" bench 1 seq --format json
 
+for i in $("$RADOS_TOOL" --pool "$POOL" ls | grep "benchmark_data"); do
+    "$RADOS_TOOL" --pool "$POOL" truncate $i 0
+done
+
+run_expect_nosignal "$RADOS_TOOL" --pool "$POOL" bench 1 rand
+run_expect_nosignal "$RADOS_TOOL" --pool "$POOL" bench 1 seq
 
 echo "SUCCESS!"
 exit 0