From: Jarkko Sakkinen <jarkko@kernel.org>
To: Ahmed Salem <x0rw3ll@gmail.com>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, shuah@kernel.org,
skhan@linuxfoundation.org, linux-integrity@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH v4] selftests: tpm2: test_smoke: use POSIX-conformant expression operator
Date: Wed, 12 Feb 2025 01:26:21 +0200 [thread overview]
Message-ID: <Z6vcnSv-fjzRQ1hy@kernel.org> (raw)
In-Reply-To: <37ztyakgrrtgvec344mg7mspchwjpxxtsprtjidso3pwkmm4f4@awsa5mzgqmtb>
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@gmail.com>
Perfect, thanks a lot.
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Shuah, do you want to pick this or?
BR, Jarkko
prev parent reply other threads:[~2025-02-11 23:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 23:16 [PATCH v4] selftests: tpm2: test_smoke: use POSIX-conformant expression operator Ahmed Salem
2025-02-11 23:26 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z6vcnSv-fjzRQ1hy@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=x0rw3ll@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox