test_batch_02.sh 663 B

1234567891011121314151617181920212223242526272829
  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_feature "BATCH_IO"; then
  6. exit "$UBLK_SKIP_CODE"
  7. fi
  8. if ! _have_program fio; then
  9. exit "$UBLK_SKIP_CODE"
  10. fi
  11. _prep_test "generic" "test UBLK_F_BATCH_IO with 4_threads vs. 1_queues"
  12. _create_backfile 0 512M
  13. dev_id=$(_add_ublk_dev -t loop -q 1 --nthreads 4 -b "${UBLK_BACKFILES[0]}")
  14. _check_add_dev $TID $?
  15. # run fio over the ublk disk
  16. fio --name=job1 --filename=/dev/ublkb"${dev_id}" --ioengine=libaio --rw=readwrite \
  17. --iodepth=32 --size=100M --numjobs=4 > /dev/null 2>&1
  18. ERR_CODE=$?
  19. _cleanup_test "generic"
  20. _show_result $TID $ERR_CODE