x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal
PATCH 1/1 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.
--- x86/vmx_tests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
x86/vmx_tests.c +4 -1
@@ -9546,7 +9546,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 }
Signature · 1 line
2.17.1
I mistakenly forgot the kvm-unit-tests in the patch subject. Sorry for that.
Quoted 30 lines · Nadav Amit
The test
atomic_switch_overflow_msrs_testis 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 <[email protected]>Signed-off-by Nadav Amit <[email protected]>---
x86/vmx_tests.c| 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)x86/vmx_tests.c +4
-1@@ -9546,7 +9546,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 }—
2.17.1
Quoted 17 lines · Nadav Amit
The test
atomic_switch_overflow_msrs_testis 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 <[email protected]>Signed-off-by Nadav Amit <[email protected]>--- x86/vmx_tests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)x86/vmx_tests.c +0
-0@@ -9546,7 +9546,10 @@ static void atomic_switch_max_msrs_test(void)
x86/vmx_tests.c static void atomic_switch_max_msrs_test(void) · line 9555
Quoted 10 lines
x86/vmx_tests.c +4
-1static 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 }
Queued, thanks.
Paolo