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 <chao.gao@xxxxxxxxx> --- x86/cet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/cet.c b/x86/cet.c index 3162b3da..5b7d311b 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.47.1