Re: [PATCH v4] selftests: tpm2: test_smoke: use POSIX-conformant expression operator

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

 



On Wed, Feb 12, 2025 at 01:16:17AM +0200, Ahmed Salem wrote:
> Use POSIX-conformant expression operator symbol '='.
> 
> The use of the non POSIX-conformant symbol '==' would work 
> in bash, but not in sh where the unexpected operator error 
> would result in test_smoke.sh being skipped.
> 
> Instead of changing the shebang to use bash, which may not be 
> available on all systems, use the POSIX-conformant expression 
> symbol '=' to test for equality.
> 
> Without this patch:
> ===================
>  # make -j8 TARGETS=tpm2 kselftest
>  # selftests: tpm2: test_smoke.sh
>  # ./test_smoke.sh: 9: [: 2: unexpected operator
>  ok 1 selftests: tpm2: test_smoke.sh # SKIP
> 
> With this patch:
> ================
>  # make -j8 TARGETS=tpm2 kselftest
>  # selftests: tpm2: test_smoke.sh
>  # Ran 9 tests in 9.236s
>  ok 1 selftests: tpm2: test_smoke.sh
> 
> Signed-off-by: Ahmed Salem <x0rw3ll@xxxxxxxxx>

Perfect, thanks a lot.

Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>

Shuah, do you want to pick this or?

BR, Jarkko




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

  Powered by Linux