Is there a risk here of missing the failures? It's common that no one looks
at the output unless it causes a failed build on some CI/CD

Le ven. 21 mars 2025, 11:01, Gary Lin via Grub-devel <grub-devel@gnu.org> a
écrit :

> Reset 'ret' to 0 when a test case fails so that the other test cases
> could continue.
>
> Signed-off-by: Gary Lin <g...@suse.com>
> ---
>  tests/tpm2_key_protector_test.in | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/tpm2_key_protector_test.in b/tests/
> tpm2_key_protector_test.in
> index 07477ba2a..0d1115e02 100644
> --- a/tests/tpm2_key_protector_test.in
> +++ b/tests/tpm2_key_protector_test.in
> @@ -291,6 +291,7 @@ for i in "${!srktests[@]}"; do
>          echo "TPM2 [${srktests[$i]}]: PASS"
>      elif [ "${ret}" -eq 1 ]; then
>          echo "TPM2 [${srktests[$i]}]: FAIL"
> +       ret=0
>      else
>         echo "Unexpected failure [${srktests[$i]}]" >&2
>         exit ${ret}
> @@ -303,6 +304,7 @@ if [ "${ret}" -eq 0 ]; then
>      echo "TPM2 [NV Index]: PASS"
>  elif [ "${ret}" -eq 1 ]; then
>      echo "TPM2 [NV Index]: FAIL"
> +    ret=0
>  else
>      echo "Unexpected failure [NV index]" >&2
>      exit ${ret}
> --
> 2.43.0
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to