Re: [PATCH blktests] Add a test that triggers the blk_mq_realloc_hw_ctxs() error path

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

 



Hi Bart,

How about we create a generic helper in rc for creating null_blk
instance ?

This functionality is needed and pretty common, so that future
test-cases can reuse the code instead of duplicating code all over ?

e.g. For NVMe blktest category we have helpers for creating
subsystems/namespaces.

On 03/14/2020 07:47 PM, Bart Van Assche wrote:
> +# Configure one null_blk instance.
> +configure_null_blk() {
> +	local nullb0="/sys/kernel/config/nullb/nullb0"
> +
> +	mkdir "$nullb0" &&
> +	echo 0 > "$nullb0/completion_nsec" &&
> +	echo 512 > "$nullb0/blocksize" &&
> +	echo 16 > "$nullb0/size" &&
> +	nproc > "$nullb0/submit_queues" &&
> +	echo 1 > "$nullb0/memory_backed" &&
> +	echo 1 > "$nullb0/power" &&
> +	ls -l /dev/nullb* &>>"$FULL"
> +}
> +





[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