Re: [PATCH] seltests/zram: fix syntax error

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

 



On 09/13/2015 10:13 PM, Zhang Zhen wrote:
> Not all shells define a variable UID. This is a bash and zsh feature only.
> In other shells, the UID variable is not defined, so here test command
> expands to [ != 0 ] which is a syntax error.
> 
> Without this patch:
> root@HGH1000007090:/opt/work/linux/tools/testing/selftests/zram# sh zram.sh
> zram.sh: 8: [: !=: unexpected operator
> zram.sh : No zram.ko module or /dev/zram0 device file not found
> zram.sh : CONFIG_ZRAM is not set
> 
> With this patch:
> root@HGH1000007090:/opt/work/linux/tools/testing/selftests/zram# sh ./zram.sh
> zram.sh : No zram.ko module or /dev/zram0 device file not found
> zram.sh : CONFIG_ZRAM is not set
> 
> Signed-off-by: Zhang Zhen <zhenzhang.zhang@xxxxxxxxxx>
> ---
>  tools/testing/selftests/zram/zram.sh     | 10 +---------
>  tools/testing/selftests/zram/zram_lib.sh |  3 ++-
>  2 files changed, 3 insertions(+), 10 deletions(-)
> 

Thanks for fixing this. Applied to linux-kselftest fixes for 4.3-rc2

-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@xxxxxxxxxxxxxxx | (970) 217-8978
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux