diff mbox series

[kvm-unit-tests,2/8] x86/tsx-ctrl: report skipping tests correctly

Message ID 20210609182945.36849-3-nadav.amit@gmail.com (mailing list archive)
State New, archived
Headers show
Series x86: non-KVM improvements | expand

Commit Message

Nadav Amit June 9, 2021, 6:29 p.m. UTC
From: Nadav Amit <nadav.amit@gmail.com>

When tsx-ctrl tests are skipped due to lack of hardware support, they
are not reported as skipped. Fix it.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
 x86/tsx-ctrl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/x86/tsx-ctrl.c b/x86/tsx-ctrl.c
index 079ad59..3b197ca 100644
--- a/x86/tsx-ctrl.c
+++ b/x86/tsx-ctrl.c
@@ -27,15 +27,15 @@  int main(int ac, char **av)
 {
     if (!this_cpu_has(X86_FEATURE_RTM)) {
         report_skip("TSX not available");
-	return 0;
+	return report_summary();
     }
     if (!this_cpu_has(X86_FEATURE_ARCH_CAPABILITIES)) {
         report_skip("ARCH_CAPABILITIES not available");
-	return 0;
+	return report_summary();
     }
     if (!(rdmsr(MSR_IA32_ARCH_CAPABILITIES) & ARCH_CAP_TSX_CTRL_MSR)) {
         report_skip("TSX_CTRL not available");
-	return 0;
+	return report_summary();
     }
 
     report(rdmsr(MSR_IA32_TSX_CTRL) == 0, "TSX_CTRL should be 0");