linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] selftests: kvm: Adding config fragments
@ 2019-08-08 12:31 Naresh Kamboju
  2019-08-08 15:10 ` Andrew Jones
  2019-08-08 17:22 ` shuah
  0 siblings, 2 replies; 10+ messages in thread
From: Naresh Kamboju @ 2019-08-08 12:31 UTC (permalink / raw)
  To: pbonzini, shuah
  Cc: linux-kernel, drjones, sean.j.christopherson, linux-kselftest,
	kvm, Naresh Kamboju

selftests kvm all test cases need pre-required kernel configs for the
tests to get pass.

The KVM tests are skipped without these configs:

        dev_fd = open(KVM_DEV_PATH, O_RDONLY);
        if (dev_fd < 0)
                exit(KSFT_SKIP);

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
---
 tools/testing/selftests/kvm/config | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 tools/testing/selftests/kvm/config

diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config
new file mode 100644
index 000000000000..63ed533f73d6
--- /dev/null
+++ b/tools/testing/selftests/kvm/config
@@ -0,0 +1,3 @@
+CONFIG_KVM=y
+CONFIG_KVM_INTEL=y
+CONFIG_KVM_AMD=y
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-08 12:31 [PATCH v2] selftests: kvm: Adding config fragments Naresh Kamboju
@ 2019-08-08 15:10 ` Andrew Jones
  2019-08-08 16:00   ` Paolo Bonzini
  2019-08-09  7:27   ` Naresh Kamboju
  2019-08-08 17:22 ` shuah
  1 sibling, 2 replies; 10+ messages in thread
From: Andrew Jones @ 2019-08-08 15:10 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: pbonzini, shuah, linux-kernel, sean.j.christopherson,
	linux-kselftest, kvm

On Thu, Aug 08, 2019 at 01:31:40PM +0100, Naresh Kamboju wrote:
> selftests kvm all test cases need pre-required kernel configs for the
> tests to get pass.
> 
> The KVM tests are skipped without these configs:
> 
>         dev_fd = open(KVM_DEV_PATH, O_RDONLY);
>         if (dev_fd < 0)
>                 exit(KSFT_SKIP);
> 
> Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> ---
>  tools/testing/selftests/kvm/config | 3 +++
>  1 file changed, 3 insertions(+)
>  create mode 100644 tools/testing/selftests/kvm/config
> 
> diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config
> new file mode 100644
> index 000000000000..63ed533f73d6
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/config
> @@ -0,0 +1,3 @@
> +CONFIG_KVM=y
> +CONFIG_KVM_INTEL=y
> +CONFIG_KVM_AMD=y
> -- 
> 2.17.1
>

What does the kselftests config file do? I was about to complain that this
would break compiling on non-x86 platforms, but 'make kselftest' and other
forms of invoking the build work fine on aarch64 even with this config
file. So is this just for documentation? If so, then its still obviously
wrong for non-x86 platforms. The only config that makes sense here is KVM.
If the other options need to be documented for x86, then should they get
an additional config file? tools/testing/selftests/kvm/x86_64/config?

Thanks,
drew

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-08 15:10 ` Andrew Jones
@ 2019-08-08 16:00   ` Paolo Bonzini
  2019-08-09  7:35     ` Naresh Kamboju
  2019-08-09  7:27   ` Naresh Kamboju
  1 sibling, 1 reply; 10+ messages in thread
From: Paolo Bonzini @ 2019-08-08 16:00 UTC (permalink / raw)
  To: Andrew Jones, Naresh Kamboju
  Cc: shuah, linux-kernel, sean.j.christopherson, linux-kselftest, kvm

On 08/08/19 17:10, Andrew Jones wrote:
>>
> What does the kselftests config file do? I was about to complain that this
> would break compiling on non-x86 platforms, but 'make kselftest' and other
> forms of invoking the build work fine on aarch64 even with this config
> file. So is this just for documentation? If so, then its still obviously
> wrong for non-x86 platforms. The only config that makes sense here is KVM.
> If the other options need to be documented for x86, then should they get
> an additional config file? tools/testing/selftests/kvm/x86_64/config?

My understanding is that a config file fragment requires some kind of
kconfig invocation to create a full .config file.  When you do that,
unknown configurations are dropped silently.

Paolo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-08 12:31 [PATCH v2] selftests: kvm: Adding config fragments Naresh Kamboju
  2019-08-08 15:10 ` Andrew Jones
@ 2019-08-08 17:22 ` shuah
  1 sibling, 0 replies; 10+ messages in thread
From: shuah @ 2019-08-08 17:22 UTC (permalink / raw)
  To: Naresh Kamboju, pbonzini
  Cc: linux-kernel, drjones, sean.j.christopherson, linux-kselftest,
	kvm, shuah

On 8/8/19 6:31 AM, Naresh Kamboju wrote:
> selftests kvm all test cases need pre-required kernel configs for the
> tests to get pass.
> 
> The KVM tests are skipped without these configs:
> 
>          dev_fd = open(KVM_DEV_PATH, O_RDONLY);
>          if (dev_fd < 0)
>                  exit(KSFT_SKIP);
> 

Thanks.

> Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> ---
>   tools/testing/selftests/kvm/config | 3 +++
>   1 file changed, 3 insertions(+)
>   create mode 100644 tools/testing/selftests/kvm/config
> 
> diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config
> new file mode 100644
> index 000000000000..63ed533f73d6
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/config
> @@ -0,0 +1,3 @@
> +CONFIG_KVM=y
> +CONFIG_KVM_INTEL=y
> +CONFIG_KVM_AMD=y
> 

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-08 15:10 ` Andrew Jones
  2019-08-08 16:00   ` Paolo Bonzini
@ 2019-08-09  7:27   ` Naresh Kamboju
  1 sibling, 0 replies; 10+ messages in thread
From: Naresh Kamboju @ 2019-08-09  7:27 UTC (permalink / raw)
  To: Andrew Jones
  Cc: Paolo Bonzini, Shuah Khan, open list, sean.j.christopherson,
	open list:KERNEL SELFTEST FRAMEWORK, kvm list

On Thu, 8 Aug 2019 at 20:40, Andrew Jones <drjones@redhat.com> wrote:
>
> On Thu, Aug 08, 2019 at 01:31:40PM +0100, Naresh Kamboju wrote:
> > selftests kvm all test cases need pre-required kernel configs for the
> > tests to get pass.
> >
> > The KVM tests are skipped without these configs:
> >
> >         dev_fd = open(KVM_DEV_PATH, O_RDONLY);
> >         if (dev_fd < 0)
> >                 exit(KSFT_SKIP);
> >
> > Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> > ---
> >  tools/testing/selftests/kvm/config | 3 +++
> >  1 file changed, 3 insertions(+)
> >  create mode 100644 tools/testing/selftests/kvm/config
> >
> > diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config
> > new file mode 100644
> > index 000000000000..63ed533f73d6
> > --- /dev/null
> > +++ b/tools/testing/selftests/kvm/config
> > @@ -0,0 +1,3 @@
> > +CONFIG_KVM=y
> > +CONFIG_KVM_INTEL=y
> > +CONFIG_KVM_AMD=y
> > --
> > 2.17.1
> >
>
> What does the kselftests config file do? I was about to complain that this
> would break compiling on non-x86 platforms, but 'make kselftest' and other
> forms of invoking the build work fine on aarch64 even with this config
> file. So is this just for documentation? If so, then its still obviously
> wrong for non-x86 platforms. The only config that makes sense here is KVM.
> If the other options need to be documented for x86, then should they get
> an additional config file? tools/testing/selftests/kvm/x86_64/config?

Addressed your comments and sent out v3 patch.
Thank for the review.

- Naresh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-08 16:00   ` Paolo Bonzini
@ 2019-08-09  7:35     ` Naresh Kamboju
  0 siblings, 0 replies; 10+ messages in thread
From: Naresh Kamboju @ 2019-08-09  7:35 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Andrew Jones, Shuah Khan, open list, sean.j.christopherson,
	open list:KERNEL SELFTEST FRAMEWORK, kvm list

On Thu, 8 Aug 2019 at 21:30, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 08/08/19 17:10, Andrew Jones wrote:
> >>
> > What does the kselftests config file do? I was about to complain that this
> > would break compiling on non-x86 platforms, but 'make kselftest' and other
> > forms of invoking the build work fine on aarch64 even with this config
> > file. So is this just for documentation? If so, then its still obviously
> > wrong for non-x86 platforms. The only config that makes sense here is KVM.
> > If the other options need to be documented for x86, then should they get
> > an additional config file? tools/testing/selftests/kvm/x86_64/config?
>
> My understanding is that a config file fragment requires some kind of
> kconfig invocation to create a full .config file.  When you do that,
> unknown configurations are dropped silently.

You are right on this point. As you said, unknown configs getting dropped for
arm64 cross compilation.

- Naresh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-07 16:19   ` Paolo Bonzini
@ 2019-08-07 16:25     ` shuah
  0 siblings, 0 replies; 10+ messages in thread
From: shuah @ 2019-08-07 16:25 UTC (permalink / raw)
  To: Paolo Bonzini, Naresh Kamboju, linux-kernel, drjones,
	sean.j.christopherson, linux-kselftest, kvm, shuah

On 8/7/19 10:19 AM, Paolo Bonzini wrote:
> On 07/08/19 17:52, shuah wrote:
>>
>>
>> On 8/7/19 7:58 AM, Naresh Kamboju wrote:
>>> selftests kvm test cases need pre-required kernel configs for the test
>>> to get pass.
>>>
>>
>> Can you elaborate and add more information on which tests fail without
>> these configs. I am all for adding configs, however I would like to
>> see more information explaining which tests don't pass without this
>> change.
> 
> The KVM tests are skipped without these configs:
> 
>          dev_fd = open(KVM_DEV_PATH, O_RDONLY);
>          if (dev_fd < 0)
>                  exit(KSFT_SKIP);
> 

Thanks Paolo!

This would be great info. to add to the commit log.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-07 15:52 ` shuah
@ 2019-08-07 16:19   ` Paolo Bonzini
  2019-08-07 16:25     ` shuah
  0 siblings, 1 reply; 10+ messages in thread
From: Paolo Bonzini @ 2019-08-07 16:19 UTC (permalink / raw)
  To: shuah, Naresh Kamboju, linux-kernel, drjones,
	sean.j.christopherson, linux-kselftest, kvm

On 07/08/19 17:52, shuah wrote:
> 
> 
> On 8/7/19 7:58 AM, Naresh Kamboju wrote:
>> selftests kvm test cases need pre-required kernel configs for the test
>> to get pass.
>>
> 
> Can you elaborate and add more information on which tests fail without
> these configs. I am all for adding configs, however I would like to
> see more information explaining which tests don't pass without this
> change.

The KVM tests are skipped without these configs:

        dev_fd = open(KVM_DEV_PATH, O_RDONLY);
        if (dev_fd < 0)
                exit(KSFT_SKIP);

Paolo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] selftests: kvm: Adding config fragments
  2019-08-07 13:58 Naresh Kamboju
@ 2019-08-07 15:52 ` shuah
  2019-08-07 16:19   ` Paolo Bonzini
  0 siblings, 1 reply; 10+ messages in thread
From: shuah @ 2019-08-07 15:52 UTC (permalink / raw)
  To: Naresh Kamboju, pbonzini, linux-kernel, drjones,
	sean.j.christopherson, linux-kselftest, kvm, shuah

Hi Naresh,

On 8/7/19 7:58 AM, Naresh Kamboju wrote:
> selftests kvm test cases need pre-required kernel configs for the test
> to get pass.
> 

Can you elaborate and add more information on which tests fail without
these configs. I am all for adding configs, however I would like to
see more information explaining which tests don't pass without this
change.

> Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> ---
>   tools/testing/selftests/kvm/config | 3 +++
>   1 file changed, 3 insertions(+)
>   create mode 100644 tools/testing/selftests/kvm/config
> 
> diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config
> new file mode 100644
> index 000000000000..63ed533f73d6
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/config
> @@ -0,0 +1,3 @@
> +CONFIG_KVM=y
> +CONFIG_KVM_INTEL=y
> +CONFIG_KVM_AMD=y
> 

That being said, it is up to Paolo to decide a call on this patch.

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] selftests: kvm: Adding config fragments
@ 2019-08-07 13:58 Naresh Kamboju
  2019-08-07 15:52 ` shuah
  0 siblings, 1 reply; 10+ messages in thread
From: Naresh Kamboju @ 2019-08-07 13:58 UTC (permalink / raw)
  To: pbonzini, linux-kernel, drjones, sean.j.christopherson,
	linux-kselftest, kvm
  Cc: Naresh Kamboju

selftests kvm test cases need pre-required kernel configs for the test
to get pass.

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
---
 tools/testing/selftests/kvm/config | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 tools/testing/selftests/kvm/config

diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config
new file mode 100644
index 000000000000..63ed533f73d6
--- /dev/null
+++ b/tools/testing/selftests/kvm/config
@@ -0,0 +1,3 @@
+CONFIG_KVM=y
+CONFIG_KVM_INTEL=y
+CONFIG_KVM_AMD=y
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-09  7:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 12:31 [PATCH v2] selftests: kvm: Adding config fragments Naresh Kamboju
2019-08-08 15:10 ` Andrew Jones
2019-08-08 16:00   ` Paolo Bonzini
2019-08-09  7:35     ` Naresh Kamboju
2019-08-09  7:27   ` Naresh Kamboju
2019-08-08 17:22 ` shuah
  -- strict thread matches above, loose matches on Subject: below --
2019-08-07 13:58 Naresh Kamboju
2019-08-07 15:52 ` shuah
2019-08-07 16:19   ` Paolo Bonzini
2019-08-07 16:25     ` shuah

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).