Skip to content

Commit

Permalink
test/test_rados_tool.sh: implement regression test for bench verify c…
Browse files Browse the repository at this point in the history
…rash

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>
  • Loading branch information
Piotr Dałek committed Sep 9, 2015
1 parent 6d07199 commit b038529
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/test_rados_tool.sh
Expand Up @@ -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 "$@"
Expand Down Expand Up @@ -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

0 comments on commit b038529

Please sign in to comment.