test_tpm2_unseal: fix invalid conditional expression
test_tpm2_unseal: fix invalid conditional expression

The commit 780c3bcdd8ec ("tpm2_unseal: print a success message if the test
finish successfully") originally was using the bash if command construct,
but was modified when merged to have the command inside brackets and match
the rest of the script.

Unfortunately commands can't be inside [] since they are used only to test
conditional expressions and not command exit code. This leads to following
error when executing the test:

./test_tpm2_unseal.sh: line 78: [: too many arguments

So take the commands out of the if statement and instead use an expression
to test the latest command exit code. This also matches what's done in the
rest of the script.

Signed-off-by: Javier Martinez Canillas <8fdf2abf85d34ea8f3f979ef25dc1f25d94aca29@redhat.com>

martinezjavier/tpm2-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools,01org/tpm2.0-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools