Message ID | 20200321050616.4272-1-namit@vmware.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal | expand |
I mistakenly forgot the kvm-unit-tests in the patch subject. Sorry for that. > On Mar 20, 2020, at 10:06 PM, Nadav Amit <namit@vmware.com> wrote: > > 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> > --- > x86/vmx_tests.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c > index 2014e54..be5c952 100644 > --- a/x86/vmx_tests.c > +++ b/x86/vmx_tests.c > @@ -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
On 21/03/20 06:06, Nadav Amit wrote: > 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> > --- > x86/vmx_tests.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c > index 2014e54..be5c952 100644 > --- a/x86/vmx_tests.c > +++ b/x86/vmx_tests.c > @@ -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 } > Queued, thanks. Paolo
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index 2014e54..be5c952 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -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 }
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> --- x86/vmx_tests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)