test_loop_06.sh 483 B

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