Refactor vitastor-cli & fio & qemu-img options in tests
This commit is contained in:
@@ -5,9 +5,9 @@ IMMEDIATE_COMMIT=1
|
||||
PG_COUNT=16
|
||||
. `dirname $0`/run_3osds.sh
|
||||
|
||||
build/src/cmd/vitastor-cli --etcd_address $ETCD_URL create -s 10G fsmeta
|
||||
build/src/cmd/vitastor-cli --etcd_address $ETCD_URL modify-pool --used-for-app fs:fsmeta testpool
|
||||
build/src/nfs/vitastor-nfs start --fs fsmeta --etcd_address $ETCD_URL --portmap 0 --port 2050 --foreground 1 --trace 1 >>./testdata/nfs.log 2>&1 &
|
||||
$VITASTOR_CLI create -s 10G fsmeta
|
||||
$VITASTOR_CLI modify-pool --used-for-app fs:fsmeta testpool
|
||||
build/src/nfs/vitastor-nfs --config_path $VITASTOR_CFG start --fs fsmeta --portmap 0 --port 2050 --foreground 1 --trace 1 >>./testdata/nfs.log 2>&1 &
|
||||
NFS_PID=$!
|
||||
|
||||
mkdir -p testdata/nfs
|
||||
@@ -16,16 +16,16 @@ MNT=$(pwd)/testdata/nfs
|
||||
trap "sudo umount -f $MNT"' || true; kill -9 $(jobs -p)' EXIT
|
||||
|
||||
# big file
|
||||
build/src/cmd/vitastor-cli --etcd_address $ETCD_URL dd if=/dev/urandom of=./testdata/ref_data.bin bs=1M count=32 seek=1024B
|
||||
build/src/cmd/vitastor-cli --etcd_address $ETCD_URL dd if=./testdata/ref_data.bin of=$MNT/testfile oflag=direct bs=1M iodepth=4 seek=1024B skip=1024B
|
||||
$VITASTOR_CLI dd if=/dev/urandom of=./testdata/ref_data.bin bs=1M count=32 seek=1024B
|
||||
$VITASTOR_CLI dd if=./testdata/ref_data.bin of=$MNT/testfile oflag=direct bs=1M iodepth=4 seek=1024B skip=1024B
|
||||
cp $MNT/testfile ./testdata/nfs_data.bin
|
||||
if ! diff -q ./testdata/ref_data.bin $MNT/testfile; then
|
||||
format_error 'Data lost during parallel unaligned writes to VitastorFS'
|
||||
fi
|
||||
|
||||
# small shared file
|
||||
build/src/cmd/vitastor-cli --etcd_address $ETCD_URL dd if=/dev/urandom of=./testdata/ref_small.bin bs=10 count=500 seek=15B
|
||||
build/src/cmd/vitastor-cli --etcd_address $ETCD_URL dd if=./testdata/ref_small.bin of=$MNT/smallfile oflag=direct bs=10 iodepth=4 seek=15B skip=15B
|
||||
$VITASTOR_CLI dd if=/dev/urandom of=./testdata/ref_small.bin bs=10 count=500 seek=15B
|
||||
$VITASTOR_CLI dd if=./testdata/ref_small.bin of=$MNT/smallfile oflag=direct bs=10 iodepth=4 seek=15B skip=15B
|
||||
cp $MNT/smallfile ./testdata/nfs_small.bin
|
||||
if ! diff -q ./testdata/ref_small.bin $MNT/smallfile; then
|
||||
format_error 'Data lost during parallel unaligned writes to a small file in VitastorFS'
|
||||
|
||||
Reference in New Issue
Block a user