Re: [PATCH 3/3] tests: always quote $LODEV

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

 



On 11/05/2016 04:08 PM, Ruediger Meier wrote:
> From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
> 
> Since there is no error handling in this test $LODEV
> may be empty.
> 
> Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
> ---
>  tests/ts/losetup/losetup-loop | 46 +++++++++++++++++++++----------------------
>  1 file changed, 23 insertions(+), 23 deletions(-)
> 
> diff --git a/tests/ts/losetup/losetup-loop b/tests/ts/losetup/losetup-loop
> index cff12c9..13ccc65 100755
> --- a/tests/ts/losetup/losetup-loop
> +++ b/tests/ts/losetup/losetup-loop
> @@ -42,15 +42,15 @@ BACKFILE="$TS_DEVICE"
>  
>  ts_init_subtest "find-race-condition"
>  LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE )
> -$TS_CMD_LOSETUP -d $LODEV
> +$TS_CMD_LOSETUP -d "$LODEV"

So what happens now when losetup is fed with ""?
Wouldn't it be better to handle the error instead?

Have a nice day,
Berny
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux