2025-03-22 17:32:16 +08:00
|
|
|
#!/bin/bash
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh
|
|
|
|
|
|
|
|
TID="stripe_01"
|
|
|
|
ERR_CODE=0
|
|
|
|
|
2025-03-27 17:51:19 +08:00
|
|
|
if ! _have_program fio; then
|
|
|
|
exit "$UBLK_SKIP_CODE"
|
|
|
|
fi
|
|
|
|
|
2025-03-22 17:32:16 +08:00
|
|
|
_prep_test "stripe" "write and verify test"
|
|
|
|
|
2025-04-12 10:30:19 +08:00
|
|
|
_create_backfile 0 256M
|
|
|
|
_create_backfile 1 256M
|
2025-03-22 17:32:16 +08:00
|
|
|
|
2025-04-12 10:30:19 +08:00
|
|
|
dev_id=$(_add_ublk_dev -t stripe "${UBLK_BACKFILES[0]}" "${UBLK_BACKFILES[1]}")
|
|
|
|
_check_add_dev $TID $?
|
2025-03-22 17:32:16 +08:00
|
|
|
|
|
|
|
# run fio over the ublk disk
|
2025-03-27 17:51:19 +08:00
|
|
|
_run_fio_verify_io --filename=/dev/ublkb"${dev_id}" --size=512M
|
2025-03-22 17:32:16 +08:00
|
|
|
ERR_CODE=$?
|
|
|
|
|
|
|
|
_cleanup_test "stripe"
|
|
|
|
_show_result $TID $ERR_CODE
|