tests: Move mbedtls_param_failed() call location record

In preparation of moving mbedtls_param_failed() to test
common code, move mbedtls_param_failed() call location
record into a context dedicated to mbedtls_param_failed().

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index 75656a8..28c7aa8 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -167,6 +167,8 @@
 void execute_function_ptr(TestWrapper_t fp, void **params)
 {
 #if defined(MBEDTLS_CHECK_PARAMS)
+    mbedtls_test_param_failed_location_record_t location_record;
+
     if ( setjmp( param_fail_jmp ) == 0 )
     {
         fp( params );
@@ -174,6 +176,10 @@
     else
     {
         /* Unexpected parameter validation error */
+        mbedtls_test_param_failed_get_location_record( &location_record );
+        test_fail( location_record.failure_condition,
+                   location_record.line,
+                   location_record.file );
         test_info.result = TEST_RESULT_FAILED;
     }