Use the standard reporting machinery in the access test so that future changes to skip variants of the test actually get reported as SKIPs. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- x86/access.c | 4 ++-- x86/access.h | 2 +- x86/access_test.c | 8 +++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/x86/access.c b/x86/access.c index 2d3d7c7b..1677d52e 100644 --- a/x86/access.c +++ b/x86/access.c @@ -1209,7 +1209,7 @@ const ac_test_fn ac_test_cases[] = check_effective_sp_permissions, }; -int ac_test_run(int pt_levels) +void ac_test_run(int pt_levels) { ac_test_t at; ac_pt_env_t pt_env; @@ -1292,5 +1292,5 @@ int ac_test_run(int pt_levels) printf("\n%d tests, %d failures\n", tests, tests - successes); - return successes == tests; + report(successes == tests, "%d-level paging tests", pt_levels); } diff --git a/x86/access.h b/x86/access.h index bcfa7b26..9a6c5628 100644 --- a/x86/access.h +++ b/x86/access.h @@ -4,6 +4,6 @@ #define PT_LEVEL_PML4 4 #define PT_LEVEL_PML5 5 -int ac_test_run(int page_table_levels); +void ac_test_run(int page_table_levels); #endif // X86_ACCESS_H \ No newline at end of file diff --git a/x86/access_test.c b/x86/access_test.c index 74360698..2ac649d2 100644 --- a/x86/access_test.c +++ b/x86/access_test.c @@ -5,10 +5,8 @@ int main(void) { - int r; - printf("starting test\n\n"); - r = ac_test_run(PT_LEVEL_PML4); + ac_test_run(PT_LEVEL_PML4); #ifndef CONFIG_EFI /* @@ -18,9 +16,9 @@ int main(void) if (this_cpu_has(X86_FEATURE_LA57)) { printf("starting 5-level paging test.\n\n"); setup_5level_page_table(); - r = ac_test_run(PT_LEVEL_PML5); + ac_test_run(PT_LEVEL_PML5); } #endif - return r ? 0 : 1; + return report_summary(); } -- 2.40.0.348.gf938b09366-goog