All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/functional/x86_64: Limit the memlock test to Linux hosts
@ 2026-01-14  9:59 Thomas Huth
  2026-01-14 10:01 ` Daniel P. Berrangé
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2026-01-14  9:59 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini; +Cc: Zhao Liu, Alexandr Moshkov

From: Thomas Huth <thuth@redhat.com>

The memlock test analyzes /proc/*/status files and expects the layout
from Linux in there. However, these files also exist on NetBSD hosts
with a completely different layout, causing this test to fail. Thus
limit the test to Linux hosts now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/x86_64/meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/functional/x86_64/meson.build b/tests/functional/x86_64/meson.build
index f78eec5e6cf..97286d78b8f 100644
--- a/tests/functional/x86_64/meson.build
+++ b/tests/functional/x86_64/meson.build
@@ -9,12 +9,13 @@ test_x86_64_timeouts = {
   'virtio_balloon': 120,
 }
 
-tests_x86_64_system_quick = [
+tests_x86_64_system_quick = \
+  (host_os == 'linux' ? ['memlock'] : []) + \
+[
   'bad_vmstate',
   'cpu_model_versions',
   'cpu_queries',
   'mem_addr_space',
-  'memlock',
   'migration',
   'pc_cpu_hotplug_props',
   'virtio_version',
-- 
2.52.0



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

* Re: [PATCH] tests/functional/x86_64: Limit the memlock test to Linux hosts
  2026-01-14  9:59 [PATCH] tests/functional/x86_64: Limit the memlock test to Linux hosts Thomas Huth
@ 2026-01-14 10:01 ` Daniel P. Berrangé
  2026-01-16  8:09   ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrangé @ 2026-01-14 10:01 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, Paolo Bonzini, Zhao Liu, Alexandr Moshkov

On Wed, Jan 14, 2026 at 10:59:04AM +0100, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> The memlock test analyzes /proc/*/status files and expects the layout
> from Linux in there. However, these files also exist on NetBSD hosts
> with a completely different layout, causing this test to fail. Thus
> limit the test to Linux hosts now.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/functional/x86_64/meson.build | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/functional/x86_64/meson.build b/tests/functional/x86_64/meson.build
> index f78eec5e6cf..97286d78b8f 100644
> --- a/tests/functional/x86_64/meson.build
> +++ b/tests/functional/x86_64/meson.build
> @@ -9,12 +9,13 @@ test_x86_64_timeouts = {
>    'virtio_balloon': 120,
>  }
>  
> -tests_x86_64_system_quick = [
> +tests_x86_64_system_quick = \
> +  (host_os == 'linux' ? ['memlock'] : []) + \

IMHO this should be done with a decorator in the test program, so
we keep all conditions in the source, not meson.

> +[
>    'bad_vmstate',
>    'cpu_model_versions',
>    'cpu_queries',
>    'mem_addr_space',
> -  'memlock',
>    'migration',
>    'pc_cpu_hotplug_props',
>    'virtio_version',
> -- 
> 2.52.0
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] tests/functional/x86_64: Limit the memlock test to Linux hosts
  2026-01-14 10:01 ` Daniel P. Berrangé
@ 2026-01-16  8:09   ` Thomas Huth
  2026-01-16  9:43     ` Daniel P. Berrangé
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2026-01-16  8:09 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: qemu-devel, Paolo Bonzini, Zhao Liu, Alexandr Moshkov

On 14/01/2026 11.01, Daniel P. Berrangé wrote:
> On Wed, Jan 14, 2026 at 10:59:04AM +0100, Thomas Huth wrote:
>> From: Thomas Huth <thuth@redhat.com>
>>
>> The memlock test analyzes /proc/*/status files and expects the layout
>> from Linux in there. However, these files also exist on NetBSD hosts
>> with a completely different layout, causing this test to fail. Thus
>> limit the test to Linux hosts now.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   tests/functional/x86_64/meson.build | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/functional/x86_64/meson.build b/tests/functional/x86_64/meson.build
>> index f78eec5e6cf..97286d78b8f 100644
>> --- a/tests/functional/x86_64/meson.build
>> +++ b/tests/functional/x86_64/meson.build
>> @@ -9,12 +9,13 @@ test_x86_64_timeouts = {
>>     'virtio_balloon': 120,
>>   }
>>   
>> -tests_x86_64_system_quick = [
>> +tests_x86_64_system_quick = \
>> +  (host_os == 'linux' ? ['memlock'] : []) + \
> 
> IMHO this should be done with a decorator in the test program, so
> we keep all conditions in the source, not meson.

If we already know here that the test will only SKIP during runtime, I think 
there is no need to add it to the test plan. Otherwise this will just always 
waste some cycles when running the tests.

  Thomas



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

* Re: [PATCH] tests/functional/x86_64: Limit the memlock test to Linux hosts
  2026-01-16  8:09   ` Thomas Huth
@ 2026-01-16  9:43     ` Daniel P. Berrangé
  2026-01-16  9:46       ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrangé @ 2026-01-16  9:43 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, Paolo Bonzini, Zhao Liu, Alexandr Moshkov

On Fri, Jan 16, 2026 at 09:09:17AM +0100, Thomas Huth wrote:
> On 14/01/2026 11.01, Daniel P. Berrangé wrote:
> > On Wed, Jan 14, 2026 at 10:59:04AM +0100, Thomas Huth wrote:
> > > From: Thomas Huth <thuth@redhat.com>
> > > 
> > > The memlock test analyzes /proc/*/status files and expects the layout
> > > from Linux in there. However, these files also exist on NetBSD hosts
> > > with a completely different layout, causing this test to fail. Thus
> > > limit the test to Linux hosts now.
> > > 
> > > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > > ---
> > >   tests/functional/x86_64/meson.build | 5 +++--
> > >   1 file changed, 3 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/tests/functional/x86_64/meson.build b/tests/functional/x86_64/meson.build
> > > index f78eec5e6cf..97286d78b8f 100644
> > > --- a/tests/functional/x86_64/meson.build
> > > +++ b/tests/functional/x86_64/meson.build
> > > @@ -9,12 +9,13 @@ test_x86_64_timeouts = {
> > >     'virtio_balloon': 120,
> > >   }
> > > -tests_x86_64_system_quick = [
> > > +tests_x86_64_system_quick = \
> > > +  (host_os == 'linux' ? ['memlock'] : []) + \
> > 
> > IMHO this should be done with a decorator in the test program, so
> > we keep all conditions in the source, not meson.
> 
> If we already know here that the test will only SKIP during runtime, I think
> there is no need to add it to the test plan. Otherwise this will just always
> waste some cycles when running the tests.

One could say the same about many of the things we check in the @skip
decorators. The time saved by doing it in meson is negligible, and
also ensures it is skipped if anyone runs the test program directly
outside meson.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] tests/functional/x86_64: Limit the memlock test to Linux hosts
  2026-01-16  9:43     ` Daniel P. Berrangé
@ 2026-01-16  9:46       ` Thomas Huth
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2026-01-16  9:46 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: qemu-devel, Paolo Bonzini, Zhao Liu, Alexandr Moshkov

On 16/01/2026 10.43, Daniel P. Berrangé wrote:
> On Fri, Jan 16, 2026 at 09:09:17AM +0100, Thomas Huth wrote:
>> On 14/01/2026 11.01, Daniel P. Berrangé wrote:
>>> On Wed, Jan 14, 2026 at 10:59:04AM +0100, Thomas Huth wrote:
>>>> From: Thomas Huth <thuth@redhat.com>
>>>>
>>>> The memlock test analyzes /proc/*/status files and expects the layout
>>>> from Linux in there. However, these files also exist on NetBSD hosts
>>>> with a completely different layout, causing this test to fail. Thus
>>>> limit the test to Linux hosts now.
>>>>
>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>> ---
>>>>    tests/functional/x86_64/meson.build | 5 +++--
>>>>    1 file changed, 3 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/tests/functional/x86_64/meson.build b/tests/functional/x86_64/meson.build
>>>> index f78eec5e6cf..97286d78b8f 100644
>>>> --- a/tests/functional/x86_64/meson.build
>>>> +++ b/tests/functional/x86_64/meson.build
>>>> @@ -9,12 +9,13 @@ test_x86_64_timeouts = {
>>>>      'virtio_balloon': 120,
>>>>    }
>>>> -tests_x86_64_system_quick = [
>>>> +tests_x86_64_system_quick = \
>>>> +  (host_os == 'linux' ? ['memlock'] : []) + \
>>>
>>> IMHO this should be done with a decorator in the test program, so
>>> we keep all conditions in the source, not meson.
>>
>> If we already know here that the test will only SKIP during runtime, I think
>> there is no need to add it to the test plan. Otherwise this will just always
>> waste some cycles when running the tests.
> 
> One could say the same about many of the things we check in the @skip
> decorators. The time saved by doing it in meson is negligible, and
> also ensures it is skipped if anyone runs the test program directly
> outside meson.

Ok, fair point, since we support running the tests without the meson test 
runner, it makes sense to check via decorator, indeed. I'll send a v2.

  Thomas



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

end of thread, other threads:[~2026-01-16  9:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14  9:59 [PATCH] tests/functional/x86_64: Limit the memlock test to Linux hosts Thomas Huth
2026-01-14 10:01 ` Daniel P. Berrangé
2026-01-16  8:09   ` Thomas Huth
2026-01-16  9:43     ` Daniel P. Berrangé
2026-01-16  9:46       ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.