public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Cathy Avery <cavery@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests v3 PATCH 1/3] vmx: Cleanup test_vmx_vmlaunch to generate clearer and more consolidated test reports
Date: Thu, 17 Feb 2022 00:56:21 +0000	[thread overview]
Message-ID: <Yg2dNU3wlmYEz+F9@google.com> (raw)
In-Reply-To: <20220216170149.25792-2-cavery@redhat.com>

On Wed, Feb 16, 2022, Cathy Avery wrote:
> In cases when xerror is 0 ( the test is not expected to error ) and
> the test does error we get a confusing test result as the vmlaunch status
> is based on !xerror:
> 
> FAIL: Enable-EPT enabled; EPT page walk length 24: vmlaunch succeeds
> 
> This patch also eliminates the double call to report per launch and
> clarifies the failure messages. New format suggested by seanjc@google.com
> 
> Signed-off-by: Cathy Avery <cavery@redhat.com>
> ---
>  x86/vmx_tests.c | 21 ++++++++++++++-------
>  1 file changed, 14 insertions(+), 7 deletions(-)
> 
> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
> index 3d57ed6..0dab98e 100644
> --- a/x86/vmx_tests.c
> +++ b/x86/vmx_tests.c
> @@ -3392,14 +3392,21 @@ static void test_vmx_vmlaunch(u32 xerror)
>  	bool success = vmlaunch_succeeds();
>  	u32 vmx_inst_err;
>  
> -	report(success == !xerror, "vmlaunch %s",
> -	       !xerror ? "succeeds" : "fails");
> -	if (!success && xerror) {
> -		vmx_inst_err = vmcs_read(VMX_INST_ERROR);
> +	if (!success)
> +	vmx_inst_err = vmcs_read(VMX_INST_ERROR);

Needs to be indended.  With that fixed,

Reviewed-by: Sean Christopherson <seanjc@google.com>

  reply	other threads:[~2022-02-17  0:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16 17:01 [kvm-unit-tests v3 PATCH 0/3] vmx: Fix EPT accessed and dirty flag test Cathy Avery
2022-02-16 17:01 ` [kvm-unit-tests v3 PATCH 1/3] vmx: Cleanup test_vmx_vmlaunch to generate clearer and more consolidated test reports Cathy Avery
2022-02-17  0:56   ` Sean Christopherson [this message]
2022-02-16 17:01 ` [kvm-unit-tests v3 PATCH 2/3] vmx: Explicitly setup a dummy EPTP in EPT accessed and dirty flag test Cathy Avery
2022-02-17  0:56   ` Sean Christopherson
2022-02-16 17:01 ` [kvm-unit-tests v3 PATCH 3/3] vmx: Correctly refresh EPTP value " Cathy Avery
2022-02-17  0:57   ` Sean Christopherson

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=Yg2dNU3wlmYEz+F9@google.com \
    --to=seanjc@google.com \
    --cc=cavery@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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