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>
[ $? -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 "$@"
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