kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Nadav Amit <nadav.amit@gmail.com>
Subject: [kvm-unit-tests PATCH 2/3] x86/vmx: Use plus for positive filters
Date: Fri, 28 Jun 2019 13:30:18 -0700	[thread overview]
Message-ID: <20190628203019.3220-3-nadav.amit@gmail.com> (raw)
In-Reply-To: <20190628203019.3220-1-nadav.amit@gmail.com>

To introduce general boot parameters, avoid vmx boot parameters from
colliding with the general ones. Precede the vmx test names with a plus
sign ('+') to indicate a test should be executed in vmx, and ignore
those that are not preceded with '-' or '+'.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
 x86/unittests.cfg | 32 ++++++++++++++++----------------
 x86/vmx.c         |  4 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index 694ee3d..dc7a85d 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -58,55 +58,55 @@ smp = 3
 
 [vmexit_cpuid]
 file = vmexit.flat
-extra_params = -append 'cpuid'
+extra_params = -append '+cpuid'
 groups = vmexit
 
 [vmexit_vmcall]
 file = vmexit.flat
-extra_params = -append 'vmcall'
+extra_params = -append '+vmcall'
 groups = vmexit
 
 [vmexit_mov_from_cr8]
 file = vmexit.flat
-extra_params = -append 'mov_from_cr8'
+extra_params = -append '+mov_from_cr8'
 groups = vmexit
 
 [vmexit_mov_to_cr8]
 file = vmexit.flat
-extra_params = -append 'mov_to_cr8'
+extra_params = -append '+mov_to_cr8'
 groups = vmexit
 
 [vmexit_inl_pmtimer]
 file = vmexit.flat
-extra_params = -append 'inl_from_pmtimer'
+extra_params = -append '+inl_from_pmtimer'
 groups = vmexit
 
 [vmexit_ipi]
 file = vmexit.flat
 smp = 2
-extra_params = -append 'ipi'
+extra_params = -append '+ipi'
 groups = vmexit
 
 [vmexit_ipi_halt]
 file = vmexit.flat
 smp = 2
-extra_params = -append 'ipi_halt'
+extra_params = -append '+ipi_halt'
 groups = vmexit
 
 [vmexit_ple_round_robin]
 file = vmexit.flat
-extra_params = -append 'ple_round_robin'
+extra_params = -append '+ple_round_robin'
 groups = vmexit
 
 [vmexit_tscdeadline]
 file = vmexit.flat
 groups = vmexit
-extra_params = -cpu qemu64,+x2apic,+tsc-deadline -append tscdeadline
+extra_params = -cpu qemu64,+x2apic,+tsc-deadline -append '+tscdeadline'
 
 [vmexit_tscdeadline_immed]
 file = vmexit.flat
 groups = vmexit
-extra_params = -cpu qemu64,+x2apic,+tsc-deadline -append tscdeadline_immed
+extra_params = -cpu qemu64,+x2apic,+tsc-deadline -append '+tscdeadline_immed'
 
 [access]
 file = access.flat
@@ -233,27 +233,27 @@ groups = vmx
 
 [ept]
 file = vmx.flat
-extra_params = -cpu host,host-phys-bits,+vmx -m 2560 -append "ept_access*"
+extra_params = -cpu host,host-phys-bits,+vmx -m 2560 -append "+ept_access*"
 arch = x86_64
 groups = vmx
 
 [vmx_eoi_bitmap_ioapic_scan]
 file = vmx.flat
 smp = 2
-extra_params = -cpu host,+vmx -m 2048 -append vmx_eoi_bitmap_ioapic_scan_test
+extra_params = -cpu host,+vmx -m 2048 -append '+vmx_eoi_bitmap_ioapic_scan_test'
 arch = x86_64
 groups = vmx
 
 [vmx_hlt_with_rvi_test]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append vmx_hlt_with_rvi_test
+extra_params = -cpu host,+vmx -append '+vmx_hlt_with_rvi_test'
 arch = x86_64
 groups = vmx
 timeout = 10
 
 [vmx_apicv_test]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append "apic_reg_virt_test virt_x2apic_mode_test"
+extra_params = -cpu host,+vmx -append "+apic_reg_virt_test +virt_x2apic_mode_test"
 arch = x86_64
 groups = vmx
 timeout = 10
@@ -261,13 +261,13 @@ timeout = 10
 [vmx_apic_passthrough_thread]
 file = vmx.flat
 smp = 2
-extra_params = -cpu host,+vmx -m 2048 -append vmx_apic_passthrough_thread_test
+extra_params = -cpu host,+vmx -m 2048 -append '+vmx_apic_passthrough_thread_test'
 arch = x86_64
 groups = vmx
 
 [vmx_vmcs_shadow_test]
 file = vmx.flat
-extra_params = -cpu host,+vmx -append vmx_vmcs_shadow_test
+extra_params = -cpu host,+vmx -append '+vmx_vmcs_shadow_test'
 arch = x86_64
 groups = vmx
 
diff --git a/x86/vmx.c b/x86/vmx.c
index 872ba11..1aa1ade 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1894,9 +1894,9 @@ test_wanted(const char *name, const char *filters[], int filter_count)
 		if (filter[0] == '-') {
 			if (simple_glob(clean_name, filter + 1))
 				return false;
-		} else {
+		} else if (filter[0] == '+') {
 			positive = true;
-			match |= simple_glob(clean_name, filter);
+			match |= simple_glob(clean_name, filter + 1);
 		}
 	}
 
-- 
2.17.1


  parent reply	other threads:[~2019-06-29  3:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 20:30 [kvm-unit-tests PATCH 0/3] x86: Running tests on bare-metal Nadav Amit
2019-06-28 20:30 ` [kvm-unit-tests PATCH 1/3] libcflat: use stdbool Nadav Amit
2019-07-02 16:08   ` Paolo Bonzini
2019-06-28 20:30 ` Nadav Amit [this message]
2019-06-28 20:30 ` [kvm-unit-tests PATCH 3/3] x86: Support environments without test-devices Nadav Amit
2019-07-02 16:08   ` Paolo Bonzini
2019-07-02 16:43     ` Nadav Amit
2019-07-02 17:24       ` Paolo Bonzini
2019-07-02 17:45         ` Nadav Amit
2019-07-02 18:28           ` Paolo Bonzini
2019-07-02 23:39             ` Nadav Amit
2019-07-02 23:56               ` Nadav Amit
2019-07-03  5:39               ` Paolo Bonzini
2019-07-03  6:09                 ` Nadav Amit
2019-07-15 15:48   ` Andrew Jones
2019-07-15 18:08     ` Nadav Amit
2019-07-15 18:26       ` Paolo Bonzini
2019-07-15 18:43         ` Nadav Amit
2019-07-15 18:54           ` Paolo Bonzini
2019-07-21 16:40             ` Nadav Amit
2019-07-21 16:51               ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190628203019.3220-3-nadav.amit@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).