Fix minor bugs in snapshot removal, check it in tests
This commit is contained in:
@@ -6,18 +6,19 @@
|
||||
|
||||
$ETCDCTL put /vitastor/config/inode/1/2 '{"name":"testimg","size":'$((32*1024*1024))'}'
|
||||
|
||||
LD_PRELOAD=libasan.so.5 \
|
||||
LD_PRELOAD="libasan.so.5 build/src/libfio_vitastor.so" \
|
||||
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","size":'$((32*1024*1024))'}'
|
||||
$ETCDCTL put /vitastor/config/inode/1/3 '{"parent_id":2,"name":"testimg","size":'$((32*1024*1024))'}'
|
||||
|
||||
LD_PRELOAD=libasan.so.5 \
|
||||
# Preload build/src/libfio_vitastor.so so libasan detects all symbols
|
||||
LD_PRELOAD="libasan.so.5 build/src/libfio_vitastor.so" \
|
||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=32 -buffer_pattern=0xdeadface \
|
||||
-rw=randwrite -etcd=$ETCD_URL -image=testimg -number_ios=1024
|
||||
|
||||
LD_PRELOAD=libasan.so.5 \
|
||||
LD_PRELOAD="libasan.so.5 build/src/libfio_vitastor.so" \
|
||||
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
|
||||
|
||||
qemu-img convert -S 4096 -p \
|
||||
@@ -42,9 +43,7 @@ cmp ./testdata/merged.bin ./testdata/check.bin
|
||||
|
||||
$ETCDCTL put /vitastor/config/inode/1/3 '{"parent_id":2,"name":"testimg","size":'$((32*1024*1024))'}'
|
||||
|
||||
build/src/vitastor-cmd merge --etcd_address $ETCD_URL testimg@0 testimg --target testimg
|
||||
|
||||
$ETCDCTL put /vitastor/config/inode/1/3 '{"name":"testimg","size":'$((32*1024*1024))'}'
|
||||
build/src/vitastor-cmd snap-rm --etcd_address $ETCD_URL testimg@0
|
||||
|
||||
qemu-img convert -S 4096 -p \
|
||||
-f raw "vitastor:etcd_host=127.0.0.1\:$ETCD_PORT/v3:image=testimg" \
|
||||
|
||||
Reference in New Issue
Block a user