Add checks for BAD_STATE before calling psa_pake_setup() in ecjpake_setup() test

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index caa5987..e7746a4 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -8128,6 +8128,23 @@
     psa_pake_cs_set_primitive( &cipher_suite, primitive_arg );
     psa_pake_cs_set_hash( &cipher_suite, hash_alg );
 
+    PSA_ASSERT( psa_pake_abort( &operation ) );
+
+    TEST_EQUAL( psa_pake_set_user( &operation, NULL, 0 ),
+                PSA_ERROR_BAD_STATE );
+    TEST_EQUAL( psa_pake_set_peer( &operation, NULL, 0 ),
+                PSA_ERROR_BAD_STATE );
+    TEST_EQUAL( psa_pake_set_password_key( &operation, key ),
+                PSA_ERROR_BAD_STATE );
+    TEST_EQUAL( psa_pake_set_role( &operation, role ),
+                PSA_ERROR_BAD_STATE );
+    TEST_EQUAL( psa_pake_output( &operation, step, NULL, 0, NULL ),
+                PSA_ERROR_BAD_STATE );
+    TEST_EQUAL( psa_pake_input( &operation, step, NULL, 0),
+                PSA_ERROR_BAD_STATE );
+
+    PSA_ASSERT( psa_pake_abort( &operation ) );
+
     status = psa_pake_setup( &operation, &cipher_suite );
     if( status != PSA_SUCCESS )
     {