Add a fail check to CTS security

Bug: 127343548
Test: FAIL_CHECK(false) -> "Check failed..."
Change-Id: Ib16a71df984fee8a306f9b16a950af4b705e04f5
diff --git a/hostsidetests/securitybulletin/securityPatch/includes/common.h b/hostsidetests/securitybulletin/securityPatch/includes/common.h
index 6800dc9..db56a31 100644
--- a/hostsidetests/securitybulletin/securityPatch/includes/common.h
+++ b/hostsidetests/securitybulletin/securityPatch/includes/common.h
@@ -23,6 +23,13 @@
 // exit status code
 #define EXIT_VULNERABLE 113
 
+#define FAIL_CHECK(condition) \
+  if (!(condition)) { \
+    fprintf(stderr, "Check failed:\n\t" #condition "\n\tLine: %d\n", \
+            __LINE__); \
+    exit(EXIT_FAILURE); \
+  }
+
 time_t start_timer(void);
 int timer_active(time_t timer_started);