mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: thuth@redhat.com, drjones@redhat.com, eric.auger.pro@gmail.com,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] selftests: KVM: AMD Nested SVM test infrastructure
Date: Tue, 21 Jan 2020 13:50:07 +0100	[thread overview]
Message-ID: <06c0cb50-75f4-2c25-c064-37e0709575c4@redhat.com> (raw)
In-Reply-To: <f156e2e0-6c75-30c2-c295-b87ee1b36600@redhat.com>

Hi Vitaly, Paolo,

On 1/21/20 1:17 PM, Paolo Bonzini wrote:
> On 21/01/20 12:12, Auger Eric wrote:
>>>> +
>>>> +static struct test tests[] = {
>>>> +	/* name, supported, custom setup, l2 code, exit code, custom check, finished */
>>>> +	{"vmmcall", NULL, NULL, l2_vmcall, SVM_EXIT_VMMCALL},
>>>> +	{"vmrun", NULL, NULL, l2_vmrun, SVM_EXIT_VMRUN},
>>>> +	{"CR3 read intercept", NULL, prepare_cr3_intercept, l2_cr3_read, SVM_EXIT_READ_CR3},
>>>> +};
>>> selftests are usualy not that well structured :-) E.g. we don't have
>>> sub-tests and a way to specify which one to run so there is a single
>>> flow when everything is being executed. I'd suggest to keep things as
>>> simple as possibe (especially in the basic 'svm' test).
>> In this case the differences between the tests is very tiny. One line on
>> L2 and one line on L1 to check the exit status. I wondered whether it
>> deserves to have separate test files for that. I did not intend to run
>> the subtests separately nor to add many more subtests but rather saw all
>> of them as a single basic test. More complex tests would be definitively
>> separate.
> 
> I would just leave this deeper kind of test to kvm-unit-tests and keep
> selftests for API tests.  So this would mean basically only keep (and
> inline) the vmmcall test.

OK this makes sense. I implemented those 3 basic tests as a proof of
concept but this definitively overlaps with kvm-unit-tests coverage. I
will focus on new tests and leverage the kselftest framework instead.

Thanks

Eric
> 
> Paolo
> 


  reply	other threads:[~2020-01-21 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 17:37 Eric Auger
2020-01-20 10:53 ` Vitaly Kuznetsov
2020-01-21 11:12   ` Auger Eric
2020-01-21 11:46     ` Vitaly Kuznetsov
2020-01-21 12:17     ` Paolo Bonzini
2020-01-21 12:50       ` Auger Eric [this message]
2020-01-21 23:02 ` Wei Huang
2020-01-22  8:45   ` Auger Eric
2020-02-03  9:26   ` Auger Eric

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=06c0cb50-75f4-2c25-c064-37e0709575c4@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=thuth@redhat.com \
    --cc=vkuznets@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

all inboxes | Powered by JetHome®