[kvm-unit-tests PATCH 4/7] nVMX: Rename vmlaunch_succeeds() to vmlaunch()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename vmlaunch_succeeds() to just vmlaunch(), the "succeeds" postfix is
misleading for any test that expects VMLAUNCH to _fail_ as it gives the
false impression that the helper expects VMLAUNCH to succeed.

Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
 x86/vmx_tests.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 03da5307..376d0a53 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -3290,7 +3290,7 @@ static void invvpid_test(void)
  * VMLAUNCH fails early and execution falls through to the next
  * instruction.
  */
-static bool vmlaunch_succeeds(void)
+static bool vmlaunch(void)
 {
 	u32 exit_reason;
 
@@ -3320,7 +3320,7 @@ success:
  */
 static void test_vmx_vmlaunch(u32 xerror)
 {
-	bool success = vmlaunch_succeeds();
+	bool success = vmlaunch();
 	u32 vmx_inst_err;
 
 	report(success == !xerror, "vmlaunch %s",
@@ -3339,7 +3339,7 @@ static void test_vmx_vmlaunch(u32 xerror)
  */
 static void test_vmx_vmlaunch2(u32 xerror1, u32 xerror2)
 {
-	bool success = vmlaunch_succeeds();
+	bool success = vmlaunch();
 	u32 vmx_inst_err;
 
 	if (!xerror1 == !xerror2)
@@ -3487,7 +3487,7 @@ static void test_secondary_processor_based_ctls(void)
 	 */
 	vmcs_write(CPU_EXEC_CTRL0, primary & ~CPU_SECONDARY);
 	vmcs_write(CPU_EXEC_CTRL1, ~0);
-	report(vmlaunch_succeeds(),
+	report(vmlaunch(),
 	       "Secondary processor-based controls ignored");
 	vmcs_write(CPU_EXEC_CTRL1, secondary);
 	vmcs_write(CPU_EXEC_CTRL0, primary);
@@ -7320,7 +7320,7 @@ static void test_pgc_vmlaunch(u32 xerror, u32 xreason, bool xfail, bool host)
 	struct vmx_state_area_test_data *data = &vmx_state_area_test_data;
 
 	if (host) {
-		success = vmlaunch_succeeds();
+		success = vmlaunch();
 		obs = rdmsr(data->msr);
 		if (!success) {
 			inst_err = vmcs_read(VMX_INST_ERROR);
-- 
2.42.0.283.g2d96d420d3-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux