xref: /linux/tools/testing/selftests/ublk/test_stripe_05.sh (revision 6f7e6393d1ce636bb7ec77a7fe7b77458fddf701)
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 "stripe" "write and verify test on user copy"
13
14_create_backfile 0 256M
15_create_backfile 1 256M
16
17dev_id=$(_add_ublk_dev -t stripe -q 2 -u "${UBLK_BACKFILES[0]}" "${UBLK_BACKFILES[1]}")
18_check_add_dev $TID $?
19
20# run fio over the ublk disk
21_run_fio_verify_io --filename=/dev/ublkb"${dev_id}" --size=512M
22ERR_CODE=$?
23
24_cleanup_test "stripe"
25_show_result $TID $ERR_CODE
26