-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/qcow2: add two tests for covering big image test
Big qcow2 image shouldn't be done automatically since the environment may not hold such big file, so just run manually. Signed-off-by: Ming Lei <[email protected]>
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
. common/fio_common | ||
. common/qcow2_common | ||
|
||
echo "run fs randwrite with verify over ublk-qcow2" | ||
|
||
IMG_SIZE=64G | ||
file=`_create_qcow2_image "null" $IMG_SIZE` | ||
|
||
QUEUES=1 | ||
URING_COMP=0 | ||
NEED_GET_DATA=0 | ||
|
||
export T_TYPE_PARAMS="-t qcow2 -q $QUEUES -u $URING_COMP -g $NEED_GET_DATA -f $file" | ||
echo -e "\trun fio(fs randwrite with verify) over ublk($T_TYPE_PARAMS)" | ||
|
||
DEV=`__create_ublk_dev` | ||
|
||
MNT=`mktemp -d` | ||
|
||
mkfs.xfs -f $DEV > /dev/null 2>&1 | ||
mount $DEV $MNT > /dev/null 2>&1 | ||
|
||
fio --size=32G --bsrange=4k-128k --runtime=20 --numjobs=12 --ioengine=libaio \ | ||
--iodepth=64 --iodepth_batch_submit=16 --iodepth_batch_complete_min=16 \ | ||
--directory=$MNT --group_reporting=1 --unlink=0 \ | ||
--direct=1 --fsync=0 --name=f1 --stonewall \ | ||
--overwrite=1 --rw=randwrite --verify=md5 > /dev/null 2>&1 | ||
umount $MNT > /dev/null 2>&1 | ||
|
||
RES=`__remove_ublk_dev_return $DEV` | ||
if [ $RES -ne 0 ]; then | ||
echo -e "\tdelete ublk0 failed" | ||
exit -1 | ||
fi | ||
|
||
_remove_qcow2_image $file | ||
|
||
rm -fr $MNT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
. common/fio_common | ||
. common/qcow2_common | ||
|
||
echo "run perf test on empty qcow2 image via ublk" | ||
|
||
file=`_create_qcow2_image "null" 64G` | ||
export T_TYPE_PARAMS="-t qcow2 -q 1 -f $file" | ||
|
||
__run_dev_perf 1 | ||
|
||
_remove_qcow2_image $file |