File Index
Files and directories
Sign in
FILE

test_generic_09.sh

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/ublk/test_generic_09.sh BASH
 1#!/bin/bash
 2# SPDX-License-Identifier: GPL-2.0
 3
 4. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh
 5
 6TID="generic_09"
 7ERR_CODE=0
 8
 9if ! _have_feature "AUTO_BUF_REG"; then
10	exit "$UBLK_SKIP_CODE"
11fi
12
13if ! _have_program fio; then
14	exit "$UBLK_SKIP_CODE"
15fi
16
17_prep_test "null" "basic IO test"
18
19dev_id=$(_add_ublk_dev -t null -z --auto_zc --auto_zc_fallback)
20_check_add_dev $TID $?
21
22# run fio over the two disks
23fio --name=job1 --filename=/dev/ublkb"${dev_id}" --ioengine=libaio --rw=readwrite --iodepth=32 --size=256M > /dev/null 2>&1
24ERR_CODE=$?
25
26_cleanup_test "null"
27
28_show_result $TID $ERR_CODE
~/ Read-only file preview.