aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNadav Amit <namit@vmware.com>2020-03-20 22:06:16 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-31 13:01:41 -0400
commitce27fa2c7cd4d07859a9a2e81c7ff641897818d1 (patch)
tree8c3795773a665bd9fa88573b5bd71ddfcf4ec98e
parentb19a7f78f758212f633ecdb5e579601d66e8e27c (diff)
downloadkvm-unit-tests-ce27fa2c7cd4d07859a9a2e81c7ff641897818d1.tar.gz
x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal
The test atomic_switch_overflow_msrs_test is only expected to pass on KVM. Skip the test when the debug device is not supported to avoid failures on bare-metal. Cc: Marc Orr <marcorr@google.com> Signed-off-by: Nadav Amit <namit@vmware.com> Message-Id: <20200321050616.4272-1-namit@vmware.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--x86/vmx_tests.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 871e752..1f97fe3 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -9547,7 +9547,10 @@ static void atomic_switch_max_msrs_test(void)
static void atomic_switch_overflow_msrs_test(void)
{
- atomic_switch_msrs_test(max_msr_list_size() + 1);
+ if (test_device_enabled())
+ atomic_switch_msrs_test(max_msr_list_size() + 1);
+ else
+ test_skip("Test is only supported on KVM");
}
#define TEST(name) { #name, .v2 = name }