test_null_03.sh 493 B

1234567891011121314151617181920212223
  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 "null" "basic IO test with user copy"
  9. dev_id=$(_add_ublk_dev -t null -u)
  10. _check_add_dev $TID $?
  11. # run fio over the two disks
  12. fio --name=job1 --filename=/dev/ublkb"${dev_id}" --ioengine=libaio --rw=readwrite --iodepth=32 --size=256M > /dev/null 2>&1
  13. ERR_CODE=$?
  14. _cleanup_test "null"
  15. _show_result $TID $ERR_CODE