Re: [PATCH blktests] sg/001: don't require scsi_debug

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

 



On Fri, Jun 23, 2017 at 10:14:48AM +0200, Johannes Thumshirn wrote:
> Don't require scsi_debug but check if TEST_DEV is a SCSI device and use it
> instead.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
> ---
>  tests/sg/001 | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/sg/001 b/tests/sg/001
> index a4cfabe25ba0..fc883ebd1c8a 100755
> --- a/tests/sg/001
> +++ b/tests/sg/001
> @@ -24,13 +24,13 @@ DESCRIPTION="try triggering a kernel GPF with 0 byte SG reads"
>  QUICK=1
>  
>  requires() {
> -	_have_src_program sg/syzkaller1 && _have_scsi_debug
> +	_have_src_program sg/syzkaller1
>  }
>  
> -test() {
> +test_device() {
>  	echo "Running ${TEST_NAME}"
>  
> -	if ! _get_scsi_debug_dev; then
> +	if ! _test_dev_is_scsi; then
>  		return 1
>  	fi

Since we already check this in tests/sg/group, we don't need this bit.
Got rid of it and applied, thanks, Johannes!

> @@ -38,7 +38,5 @@ test() {
>  	cd "$TMPDIR" || return 1
>  	timeout -s INT 10s "$SRCDIR/sg/syzkaller1" "$SG_DEV"
>  
> -	_put_scsi_debug_dev
> -
>  	echo "Test complete"
>  }
> -- 
> 2.12.3
> 



[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