feat(sys_reg_trace): add trace system registers access test

Added a test to read trace system registers to ensure that EL3
is giving permission to non-secure EL2 to access these registers.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I0bdbb5aff81a78fc3a3766278c48b25bb6e1779f
diff --git a/include/common/test_helpers.h b/include/common/test_helpers.h
index a6f3768..332f1d8 100644
--- a/include/common/test_helpers.h
+++ b/include/common/test_helpers.h
@@ -263,6 +263,15 @@
 		}								\
 	} while (false)
 
+#define SKIP_TEST_IF_SYS_REG_TRACE_NOT_SUPPORTED()				\
+	do {									\
+		if (!get_armv8_0_sys_reg_trace_support()) {			\
+			tftf_testcase_printf("ARMv8-system register"		\
+					     "trace not supported\n");		\
+			return TEST_RESULT_SKIPPED;				\
+		}								\
+	} while (false)
+
 /* Helper macro to verify if system suspend API is supported */
 #define is_psci_sys_susp_supported()	\
 		(tftf_get_psci_feature_info(SMC_PSCI_SYSTEM_SUSPEND)		\