tests: Isolate mbedtls_param_failed() long jump

In preparation of moving mbedtls_param_failed() to test
common code, isolate mbedtls_param_failed() long
jump data and set up from unit test data and code.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index 28c7aa8..9d43129 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -169,7 +169,7 @@
 #if defined(MBEDTLS_CHECK_PARAMS)
     mbedtls_test_param_failed_location_record_t location_record;
 
-    if ( setjmp( param_fail_jmp ) == 0 )
+    if ( setjmp( mbedtls_test_param_failed_get_state_buf( ) ) == 0 )
     {
         fp( params );
     }
@@ -183,7 +183,7 @@
         test_info.result = TEST_RESULT_FAILED;
     }
 
-    memset( param_fail_jmp, 0, sizeof(jmp_buf) );
+    mbedtls_test_param_failed_reset_state( );
 #else
     fp( params );
 #endif