1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3 4. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh 5 6TID="loop_03" 7ERR_CODE=0 8 9_prep_test "loop" "write and verify over zero copy" 10 11backfile_0=$(_create_backfile 256M) 12dev_id=$(_add_ublk_dev -t loop -z "$backfile_0") 13_check_add_dev $TID $? "$backfile_0" 14 15# run fio over the ublk disk 16fio --name=write_and_verify \ 17 --filename=/dev/ublkb"${dev_id}" \ 18 --ioengine=libaio --iodepth=64 \ 19 --rw=write \ 20 --size=256M \ 21 --direct=1 \ 22 --verify=crc32c \ 23 --do_verify=1 \ 24 --bs=4k > /dev/null 2>&1 25ERR_CODE=$? 26 27_cleanup_test "loop" 28 29_remove_backfile "$backfile_0" 30 31_show_result $TID $ERR_CODE 32