diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 23ff19b4..eeb30c26 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1818,6 +1818,24 @@ jobs: echo "" done + test_old_partwr_csum: + runs-on: ubuntu-latest + needs: build + container: ${{env.TEST_IMAGE}}:${{github.sha}} + steps: + - name: Run test + id: test + timeout-minutes: 3 + run: OLD=1 /root/vitastor/tests/test_partwr_csum.sh + - name: Print logs + if: always() && steps.test.outcome == 'failure' + run: | + for i in /root/vitastor/testdata/*.log /root/vitastor/testdata/*.txt; do + echo "-------- $i --------" + cat $i + echo "" + done + test_heal_old_csum_32k_dmj: runs-on: ubuntu-latest needs: build diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 47b7f6df..1b87463e 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -138,6 +138,7 @@ OLD=1 SCHEME=xor ./test_scrub.sh OLD=1 PG_SIZE=3 ./test_scrub.sh OLD=1 PG_SIZE=6 PG_MINSIZE=4 OSD_COUNT=6 SCHEME=ec ./test_scrub.sh OLD=1 SCHEME=ec ./test_scrub.sh +OLD=1 ./test_partwr_csum.sh TEST_NAME=old_csum_32k_dmj OLD=1 OSD_ARGS="--data_csum_type crc32c --csum_block_size 32k --inmemory_metadata false --inmemory_journal false" OFFSET_ARGS=$OSD_ARGS ./test_heal.sh TEST_NAME=old_csum_32k_dj OLD=1 OSD_ARGS="--data_csum_type crc32c --csum_block_size 32k --inmemory_journal false" OFFSET_ARGS=$OSD_ARGS ./test_heal.sh diff --git a/tests/test_partwr_csum.sh b/tests/test_partwr_csum.sh new file mode 100755 index 00000000..6ba598c8 --- /dev/null +++ b/tests/test_partwr_csum.sh @@ -0,0 +1,18 @@ +#!/bin/bash -ex + +OSD_ARGS="--data_csum_type crc32c" +OFFSET_ARGS=$OSD_ARGS +GLOBAL_CONFIG=',"client_eio_retry_interval":0' +. `dirname $0`/run_3osds.sh + +$VITASTOR_CLI create -s 32M testimg + +$VITASTOR_FIO -bs=4k -blockalign=128k -direct=1 -iodepth=16 -end_fsync=1 -rw=write -image=testimg + +$VITASTOR_CLI dd iimg=testimg of=/dev/null + +if grep -q 'Checksum mismatch' ./testdata/osd*.log; then + format_error Checksum mismatches detected during test +fi + +format_green OK