test: psa: minor improvements to test

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index 3906d3e..03f5955 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -7989,6 +7989,8 @@
             -C "found ecjpake_kkpp extension" \
             -s "SSL - The handshake negotiation failed"
 
+# Note: if the name of this test is changed, then please adjust the corresponding
+#       filtering label in "test_tls1_2_ecjpake_compatibility" (in "all.sh")
 requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
 requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
 run_test    "ECJPAKE: working, TLS" \
@@ -8028,6 +8030,8 @@
             -S "SSL - The handshake negotiation failed" \
             -S "SSL - Verification of the message MAC failed"
 
+# Note: if the name of this test is changed, then please adjust the corresponding
+#       filtering label in "test_tls1_2_ecjpake_compatibility" (in "all.sh")
 requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
 requires_config_enabled MBEDTLS_USE_PSA_CRYPTO
 requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
@@ -8049,6 +8053,8 @@
             -S "SSL - The handshake negotiation failed" \
             -S "SSL - Verification of the message MAC failed"
 
+# Note: if the name of this test is changed, then please adjust the corresponding
+#       filtering label in "test_tls1_2_ecjpake_compatibility" (in "all.sh")
 requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
 requires_config_enabled MBEDTLS_USE_PSA_CRYPTO
 requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function
index c3b6015..3d9a6fd 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -2590,12 +2590,12 @@
     ret = ( use_opaque_arg ) ?                                            \
         mbedtls_ssl_set_hs_ecjpake_password_opaque( &ssl, pwd_slot ) :    \
         mbedtls_ssl_set_hs_ecjpake_password( &ssl, pwd_string, pwd_len ); \
-    TEST_ASSERT( ret == exp_ret_val )
+    TEST_EQUAL( ret, exp_ret_val )
 #else
 #define ECJPAKE_TEST_SET_PASSWORD( exp_ret_val )                \
     ret = mbedtls_ssl_set_hs_ecjpake_password( &ssl,            \
                                         pwd_string, pwd_len );  \
-    TEST_ASSERT( ret == exp_ret_val )
+    TEST_EQUAL( ret, exp_ret_val )
 #endif
 /* END_HEADER */
 
@@ -6219,13 +6219,12 @@
 
     mbedtls_ssl_config_init( &conf );
 
-    TEST_ASSERT( mbedtls_ssl_config_defaults( &conf,
+    TEST_EQUAL( mbedtls_ssl_config_defaults( &conf,
                                               MBEDTLS_SSL_IS_CLIENT,
                                               MBEDTLS_SSL_TRANSPORT_STREAM,
-                                              MBEDTLS_SSL_PRESET_DEFAULT )
-                 == 0 );
+                                              MBEDTLS_SSL_PRESET_DEFAULT ), 0 );
 
-    TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 );
+    TEST_EQUAL( mbedtls_ssl_setup( &ssl, &conf ), 0 );
 
     /* test with empty password or unitialized password key (depending on use_opaque_arg) */
     ECJPAKE_TEST_SET_PASSWORD( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
@@ -6242,8 +6241,8 @@
         psa_set_key_algorithm( &attributes, PSA_ALG_JPAKE );
         psa_set_key_type( &attributes, PSA_KEY_TYPE_PASSWORD );
 
-        TEST_ASSERT( psa_import_key( &attributes, pwd_string,
-                    pwd_len, &pwd_slot ) == PSA_SUCCESS );
+        PSA_ASSERT( psa_import_key( &attributes, pwd_string,
+                    pwd_len, &pwd_slot ) );
     }
 #endif  /* MBEDTLS_USE_PSA_CRYPTO */