From 09725038e792ccbeb451a75283a93fcfab9f3e6c Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 4 Feb 2021 02:03:13 +0300 Subject: [PATCH] Begin snapshot test --- tests/test_write.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/test_write.sh b/tests/test_write.sh index 5f1002c01..50e8b2471 100755 --- a/tests/test_write.sh +++ b/tests/test_write.sh @@ -34,7 +34,30 @@ fi #LD_PRELOAD=libasan.so.5 \ # fio -thread -name=test -ioengine=build/src/libfio_vitastor_sec.so -bs=4k -fsync=128 `$ETCDCTL get /vitastor/osd/state/1 --print-value-only | jq -r '"-host="+.addresses[0]+" -port="+(.port|tostring)'` -rw=write -size=32M +# Test basic write + LD_PRELOAD=libasan.so.5 \ fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=1G -cluster_log_level=10 +# Test snapshot + +LD_PRELOAD=libasan.so.5 \ + fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=2 -size=32M -cluster_log_level=10 + +$ETCDCTL put /vitastor/config/inode/1/2 '{"name":"testimg@0"}' +$ETCDCTL put /vitastor/config/inode/1/3 '{"parent_id":2,"name":"testimg"}' + +LD_PRELOAD=libasan.so.5 \ + fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=32 -rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=3 -size=32M -number_ios=1024 + +LD_PRELOAD=libasan.so.5 \ + fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -rw=read -etcd=$ETCD_URL -pool=1 -inode=3 -size=32M + +$ETCDCTL put /vitastor/config/inode/1/3 '{"name":"testimg"}' + +LC_ALL=C LANG=C \ +qemu-img convert -S 4096 -p \ + -f raw "vitastor:etcd_host=127.0.0.1\:$ETCD_PORT/v3:pool=1:inode=3:size=$((32*1024*1024))" \ + -O raw ./testdata/layer1.bin + format_green OK