On 3/21/25 3:59 AM, Gary Lin via Grub-devel wrote:
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}

Reviewed-by: Stefan Berger <stef...@linux.ibm.com>


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to