Add a version of VMX's TEST_ASSERT that doesn't report. The output of basic assertions is annoying, and other than inflating the number of tests to make KUT look good, there's no value in reporting that KUT is working as intended. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- x86/vmx.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x86/vmx.h b/x86/vmx.h index c1a8f6a..47b0461 100644 --- a/x86/vmx.h +++ b/x86/vmx.h @@ -9,7 +9,7 @@ void __abort_test(void); -#define TEST_ASSERT(cond) \ +#define __TEST_ASSERT(cond) \ do { \ if (!(cond)) { \ report_fail("%s:%d: Assertion failed: %s", \ @@ -17,6 +17,11 @@ do { \ dump_stack(); \ __abort_test(); \ } \ +} while (0) + +#define TEST_ASSERT(cond) \ +do { \ + __TEST_ASSERT(cond); \ report_passed(); \ } while (0) -- 2.34.0.rc2.393.gf8c9666880-goog