From 819cb70cdd20dd33840ea0c8304a2d7a23aee57f Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 17 Jun 2023 01:18:34 +0300 Subject: [PATCH] Check for "Checksum mismatch" and "BUG" messages during test_heal --- tests/test_heal.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_heal.sh b/tests/test_heal.sh index e1538e1c..cd8687a7 100755 --- a/tests/test_heal.sh +++ b/tests/test_heal.sh @@ -56,10 +56,12 @@ qemu-img convert -S 4096 -p \ -f raw "vitastor:etcd_host=127.0.0.1\:$ETCD_PORT/v3:image=testimg" \ -O raw ./testdata/read.bin -diff ./testdata/read.bin ./testdata/mirror.bin +if ! diff -q ./testdata/read.bin ./testdata/mirror.bin; then + format_error Data lost during self-heal +fi -if grep -q 'Checksum mismatch' ./testdata/osd*.log; then - format_error Checksum mismatches detected during test +if grep -qP 'Checksum mismatch|BUG' ./testdata/osd*.log; then + format_error Checksum mismatches or BUGs detected during test fi format_green OK