xref: /aosp_15_r20/external/ublksrv/tests/debug/test_dev (revision 94c4a1e103eb1715230460aab379dff275992c20)
1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3#
4#usage:
5#	export UBLK_DBG_DEV=/dev/vdc; make test T=debug/test_dev
6
7
8. common/fio_common
9
10echo "run io test on specified device"
11
12DEV=${UBLK_DBG_DEV}
13TYPE="debug"
14
15DEV_NAME=`basename $DEV`
16QUEUES=`ls /sys/block/${DEV_NAME}/mq | wc -l`
17IOSCHED=`cat /sys/block/${DEV_NAME}/queue/scheduler | sed -n 's/.*\[\(.*\)\].*/\1/p'`
18JOBS=1
19
20echo -e "\tfio ($DEV, libaio, dio, io_jobs: $JOBS hw queues:$QUEUES, io_sched: $IOSCHED)..."
21__run_dev_perf_no_create $TYPE $JOBS $DEV
22
23