From: Chao Gao report_skip() function is preferred for skipping inapplicable tests when the necessary hardware features are unavailable. For example, with this patch applied, the test output is as follows if IBT is not supported: SKIP: IBT not enabled SUMMARY: 1 tests, 1 skipped Previously, it printed: IBT not enabled SUMMARY: 0 tests Signed-off-by: Chao Gao Signed-off-by: Mathias Krause Signed-off-by: Sean Christopherson --- x86/cet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/cet.c b/x86/cet.c index 0452851d..d6ca5dd8 100644 --- a/x86/cet.c +++ b/x86/cet.c @@ -59,12 +59,12 @@ int main(int ac, char **av) bool rvc; if (!this_cpu_has(X86_FEATURE_SHSTK)) { - printf("SHSTK not enabled\n"); + report_skip("SHSTK not enabled"); return report_summary(); } if (!this_cpu_has(X86_FEATURE_IBT)) { - printf("IBT not enabled\n"); + report_skip("IBT not enabled"); return report_summary(); } -- 2.52.0.rc1.455.g30608eb744-goog