From bd36c4746a9788fb02902c2999c4726a0fd1dcc5 Mon Sep 17 00:00:00 2001 From: Waleed Elmelegy Date: Wed, 13 Nov 2024 13:08:26 +0000 Subject: [PATCH] Stop IOP generate key complete test in case expected value is not success Signed-off-by: Waleed Elmelegy --- tf-psa-crypto/tests/suites/test_suite_psa_crypto.function | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tf-psa-crypto/tests/suites/test_suite_psa_crypto.function b/tf-psa-crypto/tests/suites/test_suite_psa_crypto.function index b6e30c4763..900c9346d1 100644 --- a/tf-psa-crypto/tests/suites/test_suite_psa_crypto.function +++ b/tf-psa-crypto/tests/suites/test_suite_psa_crypto.function @@ -10158,6 +10158,10 @@ void generate_key(int type_arg, status = psa_generate_key_iop_setup(&operation, &attributes); TEST_EQUAL(status, expected_status); + if (expected_status != PSA_SUCCESS) { + goto exit; + } + do { status = psa_generate_key_iop_complete(&operation, &iop_key); } while (status == PSA_OPERATION_INCOMPLETE);