tests/functional/x86_64: Limit the memlock test to Linux hosts
PATCH 1/1 tests/functional/x86_64: Limit the memlock test to Linux hosts
From: Thomas Huth <[email protected]>
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.
--- tests/functional/x86_64/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/functional/x86_64/meson.build +3 -2
@@ -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',
Signature · 1 line
2.52.0
Quoted 17 lines · Thomas Huth
From: Thomas Huth <[email protected]>
The memlock test analyzes
/proc/*/statusfiles 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 <[email protected]>--- tests/functional/x86_64/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/functional/x86_64/meson.build +0
-0
tests/functional/x86_64/meson.build test_x86_64_timeouts = { · line 13
Quoted 6 lines
tests/functional/x86_64/meson.build +2
-1@@ -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.
Quoted 13 lines
tests/functional/x86_64/meson.build +1
-1+[ 'bad_vmstate', 'cpu_model_versions', 'cpu_queries', 'mem_addr_space', - 'memlock', 'migration', 'pc_cpu_hotplug_props', 'virtio_version',Signature · 1 line
2.52.0
With regards,
Daniel
Signature · 3 lines
|: 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 :|
Quoted 21 lines · Daniel P. Berrangé
Quoted 20 lines · Thomas Huth
From: Thomas Huth <[email protected]>
The memlock test analyzes
/proc/*/statusfiles 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 <[email protected]>--- tests/functional/x86_64/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/functional/x86_64/meson.build +0
-0@@ -9,12 +9,13 @@ test_x86_64_timeouts = { 'virtio_balloon': 120, }
Quoted 6 lines
tests/functional/x86_64/meson.build test_x86_64_timeouts = { · line 13
Quoted 3 lines
tests/functional/x86_64/meson.build +2
-1-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
Quoted 28 lines · Thomas Huth
Quoted 13 lines · Daniel P. Berrangé
Quoted 12 lines · Thomas Huth
From: Thomas Huth <[email protected]>
The memlock test analyzes
/proc/*/statusfiles 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 <[email protected]>--- tests/functional/x86_64/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Quoted 13 lines
tests/functional/x86_64/meson.build test_x86_64_timeouts = { · line 12
Quoted 10 lines
tests/functional/x86_64/meson.build +2
-1@@ -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.
Quoted 3 lines
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
Signature · 3 lines
|: 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 :|
Quoted 29 lines · Daniel P. Berrangé
Quoted 28 lines · Thomas Huth
Quoted 26 lines · Daniel P. Berrangé
Quoted 17 lines · Thomas Huth
From: Thomas Huth <[email protected]>
The memlock test analyzes
/proc/*/statusfiles 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 <[email protected]>--- tests/functional/x86_64/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/functional/x86_64/meson.build +0
-0tests/functional/x86_64/meson.build test_x86_64_timeouts = { · line 12
Quoted 5 lines
tests/functional/x86_64/meson.build +2
-1@@ -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.
Quoted 8 lines
Quoted 3 lines
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