* [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal
@ 2020-03-21 5:06 Nadav Amit
2020-03-23 19:42 ` Nadav Amit
2020-03-31 17:01 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Nadav Amit @ 2020-03-21 5:06 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm, Nadav Amit, Marc Orr
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal
2020-03-21 5:06 [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal Nadav Amit
@ 2020-03-23 19:42 ` Nadav Amit
2020-03-31 17:01 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Nadav Amit @ 2020-03-23 19:42 UTC (permalink / raw)
To: Nadav Amit; +Cc: Paolo Bonzini, kvm, Marc Orr
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal
2020-03-21 5:06 [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal Nadav Amit
2020-03-23 19:42 ` Nadav Amit
@ 2020-03-31 17:01 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-03-31 17:01 UTC (permalink / raw)
To: Nadav Amit; +Cc: kvm, Marc Orr
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-31 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-21 5:06 [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal Nadav Amit
2020-03-23 19:42 ` Nadav Amit
2020-03-31 17:01 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).