Re: [PATCH blktests 1/3] Introduce the io_schedulers() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 27, 2022 / 14:31, Bart Van Assche wrote:
> The functionality for retrieving the I/O schedulers supported by a request
> queue occurs multiple times. Hence introduce a function for retrieving the
> supported I/O schedulers.
> 
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>

[...]

> diff --git a/tests/block/005 b/tests/block/005
> index 77b9e2f57203..383c8f5b7d2b 100755
> --- a/tests/block/005
> +++ b/tests/block/005
> @@ -5,6 +5,7 @@
>  # Threads doing IO to a device, while we switch schedulers
>  
>  . tests/block/rc
> +. common/iosched
>  
>  DESCRIPTION="switch schedulers while doing IO"
>  TIMED=1
> @@ -17,9 +18,8 @@ requires() {
>  test_device() {
>  	echo "Running ${TEST_NAME}"
>  
> -	local scheds
>  	# shellcheck disable=SC2207
> -	scheds=($(sed 's/[][]//g' "${TEST_DEV_SYSFS}/queue/scheduler"))
> +	local scheds=($(io_schedulers "${TEST_DEV_SYSFS}"))

I ran block/005 with this patch and observed it fails without failure message.
To fix it, the line above should be:
        local scheds=($(io_schedulers "$(basename "${TEST_DEV}")"))

-- 
Best Regards,
Shin'ichiro Kawasaki



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux