1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3 4. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh 5 6ERR_CODE=0 7 8if ! _have_program fio; then 9 exit "$UBLK_SKIP_CODE" 10fi 11 12_prep_test "loop" "write and verify over zero copy" 13 14_create_backfile 0 256M 15dev_id=$(_add_ublk_dev -t loop -z "${UBLK_BACKFILES[0]}") 16_check_add_dev $TID $? 17 18# run fio over the ublk disk 19_run_fio_verify_io --filename=/dev/ublkb"${dev_id}" --size=256M 20ERR_CODE=$? 21 22_cleanup_test "loop" 23 24_show_result $TID $ERR_CODE 25