* [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs
@ 2021-09-23 8:15 Paolo Bonzini
2021-09-23 8:22 ` Daniel P. Berrangé
0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2021-09-23 8:15 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, berrange
Skip the test if bzip2 is not available, and run it after they are
uncompressed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
pc-bios/meson.build | 3 ++-
tests/qtest/meson.build | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index f2b32598af..975565198e 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -10,8 +10,9 @@ if install_edk2_blobs
'edk2-x86_64-secure-code.fd',
]
+ roms = []
foreach f : fds
- custom_target(f,
+ roms += custom_target(f,
build_by_default: have_system,
output: f,
input: '@0@.bz2'.format(f),
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index e1f4df3df8..6d8100c9de 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -68,12 +68,12 @@ qtests_i386 = \
(config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \
(config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \
(config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \
+ (install_edk2_blobs ? ['bios-tables-test'] : []) + \
qtests_pci + \
['fdc-test',
'ide-test',
'hd-geo-test',
'boot-order-test',
- 'bios-tables-test',
'rtc-test',
'i440fx-test',
'fw_cfg-test',
@@ -180,7 +180,7 @@ qtests_arm = \
# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
qtests_aarch64 = \
- (cpu != 'arm' ? ['bios-tables-test'] : []) + \
+ (cpu != 'arm' and install_edk2_blobs ? ['bios-tables-test'] : []) + \
(config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \
(config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \
['arm-cpu-features',
@@ -269,7 +269,7 @@ foreach dir : target_dirs
qtest_emulator = emulators['qemu-system-' + target_base]
target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic
- test_deps = []
+ test_deps = roms
qtest_env = environment()
if have_tools
qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
--
2.27.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs
2021-09-23 8:15 [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs Paolo Bonzini
@ 2021-09-23 8:22 ` Daniel P. Berrangé
2021-09-23 10:00 ` Philippe Mathieu-Daudé
2021-09-23 10:29 ` Paolo Bonzini
0 siblings, 2 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2021-09-23 8:22 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: peter.maydell, qemu-devel
On Thu, Sep 23, 2021 at 04:15:55AM -0400, Paolo Bonzini wrote:
> Skip the test if bzip2 is not available, and run it after they are
> uncompressed.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> pc-bios/meson.build | 3 ++-
> tests/qtest/meson.build | 6 +++---
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index f2b32598af..975565198e 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -10,8 +10,9 @@ if install_edk2_blobs
> 'edk2-x86_64-secure-code.fd',
> ]
>
> + roms = []
> foreach f : fds
> - custom_target(f,
> + roms += custom_target(f,
> build_by_default: have_system,
> output: f,
> input: '@0@.bz2'.format(f),
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index e1f4df3df8..6d8100c9de 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -68,12 +68,12 @@ qtests_i386 = \
> (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \
> (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \
> (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \
> + (install_edk2_blobs ? ['bios-tables-test'] : []) + \
> qtests_pci + \
> ['fdc-test',
> 'ide-test',
> 'hd-geo-test',
> 'boot-order-test',
> - 'bios-tables-test',
> 'rtc-test',
> 'i440fx-test',
> 'fw_cfg-test',
> @@ -180,7 +180,7 @@ qtests_arm = \
>
> # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
> qtests_aarch64 = \
> - (cpu != 'arm' ? ['bios-tables-test'] : []) + \
> + (cpu != 'arm' and install_edk2_blobs ? ['bios-tables-test'] : []) + \
> (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \
> (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \
> ['arm-cpu-features',
> @@ -269,7 +269,7 @@ foreach dir : target_dirs
> qtest_emulator = emulators['qemu-system-' + target_base]
> target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic
>
> - test_deps = []
> + test_deps = roms
Shouldn't this be
if install_edk2_blobs
test_deps += roms
endif
> qtest_env = environment()
> if have_tools
> qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
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] 7+ messages in thread
* Re: [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs
2021-09-23 8:22 ` Daniel P. Berrangé
@ 2021-09-23 10:00 ` Philippe Mathieu-Daudé
2021-09-23 10:32 ` Paolo Bonzini
2021-09-23 10:29 ` Paolo Bonzini
1 sibling, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-23 10:00 UTC (permalink / raw)
To: Daniel P. Berrangé, Paolo Bonzini; +Cc: peter.maydell, qemu-devel
On 9/23/21 10:22, Daniel P. Berrangé wrote:
> On Thu, Sep 23, 2021 at 04:15:55AM -0400, Paolo Bonzini wrote:
>> Skip the test if bzip2 is not available, and run it after they are
>> uncompressed.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> pc-bios/meson.build | 3 ++-
>> tests/qtest/meson.build | 6 +++---
>> 2 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
>> index f2b32598af..975565198e 100644
>> --- a/pc-bios/meson.build
>> +++ b/pc-bios/meson.build
>> @@ -10,8 +10,9 @@ if install_edk2_blobs
>> 'edk2-x86_64-secure-code.fd',
>> ]
>>
>> + roms = []
>> foreach f : fds
>> - custom_target(f,
>> + roms += custom_target(f,
>> build_by_default: have_system,
>> output: f,
>> input: '@0@.bz2'.format(f),
>> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
>> index e1f4df3df8..6d8100c9de 100644
>> --- a/tests/qtest/meson.build
>> +++ b/tests/qtest/meson.build
>> @@ -68,12 +68,12 @@ qtests_i386 = \
>> (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \
>> + (install_edk2_blobs ? ['bios-tables-test'] : []) + \
>> qtests_pci + \
>> ['fdc-test',
>> 'ide-test',
>> 'hd-geo-test',
>> 'boot-order-test',
>> - 'bios-tables-test',
>> 'rtc-test',
>> 'i440fx-test',
>> 'fw_cfg-test',
>> @@ -180,7 +180,7 @@ qtests_arm = \
>>
>> # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
>> qtests_aarch64 = \
>> - (cpu != 'arm' ? ['bios-tables-test'] : []) + \
>> + (cpu != 'arm' and install_edk2_blobs ? ['bios-tables-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \
>> ['arm-cpu-features',
>> @@ -269,7 +269,7 @@ foreach dir : target_dirs
>> qtest_emulator = emulators['qemu-system-' + target_base]
>> target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic
>>
>> - test_deps = []
>> + test_deps = roms
>
> Shouldn't this be
>
> if install_edk2_blobs
> test_deps += roms
> endif
See also "blobs: Only install required (system emulation) files":
https://lore.kernel.org/qemu-devel/20210323155132.238193-1-f4bug@amsat.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs
2021-09-23 8:22 ` Daniel P. Berrangé
2021-09-23 10:00 ` Philippe Mathieu-Daudé
@ 2021-09-23 10:29 ` Paolo Bonzini
1 sibling, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2021-09-23 10:29 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: peter.maydell, qemu-devel
On 23/09/21 10:22, Daniel P. Berrangé wrote:
> On Thu, Sep 23, 2021 at 04:15:55AM -0400, Paolo Bonzini wrote:
>> Skip the test if bzip2 is not available, and run it after they are
>> uncompressed.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> pc-bios/meson.build | 3 ++-
>> tests/qtest/meson.build | 6 +++---
>> 2 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
>> index f2b32598af..975565198e 100644
>> --- a/pc-bios/meson.build
>> +++ b/pc-bios/meson.build
>> @@ -10,8 +10,9 @@ if install_edk2_blobs
>> 'edk2-x86_64-secure-code.fd',
>> ]
>>
>> + roms = []
>> foreach f : fds
>> - custom_target(f,
>> + roms += custom_target(f,
>> build_by_default: have_system,
>> output: f,
>> input: '@0@.bz2'.format(f),
>> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
>> index e1f4df3df8..6d8100c9de 100644
>> --- a/tests/qtest/meson.build
>> +++ b/tests/qtest/meson.build
>> @@ -68,12 +68,12 @@ qtests_i386 = \
>> (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \
>> + (install_edk2_blobs ? ['bios-tables-test'] : []) + \
>> qtests_pci + \
>> ['fdc-test',
>> 'ide-test',
>> 'hd-geo-test',
>> 'boot-order-test',
>> - 'bios-tables-test',
>> 'rtc-test',
>> 'i440fx-test',
>> 'fw_cfg-test',
>> @@ -180,7 +180,7 @@ qtests_arm = \
>>
>> # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
>> qtests_aarch64 = \
>> - (cpu != 'arm' ? ['bios-tables-test'] : []) + \
>> + (cpu != 'arm' and install_edk2_blobs ? ['bios-tables-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \
>> ['arm-cpu-features',
>> @@ -269,7 +269,7 @@ foreach dir : target_dirs
>> qtest_emulator = emulators['qemu-system-' + target_base]
>> target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic
>>
>> - test_deps = []
>> + test_deps = roms
>
> Shouldn't this be
>
> if install_edk2_blobs
> test_deps += roms
> endif
That, or (better) move the "roms = []" initializer outside the "if
install_edk2_blobs".
Also, right now bios-tables-test hangs (before the patch) or is skipped
(after) if --disable-blobs is used on the configure command line. We
can do the unpack in that case and skip the installation. This is not
really necessary to fix the issues that Peter saw in vm-build-freebsd,
but it does not hurt either.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs
2021-09-23 10:00 ` Philippe Mathieu-Daudé
@ 2021-09-23 10:32 ` Paolo Bonzini
2021-09-23 10:44 ` Peter Maydell
0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2021-09-23 10:32 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Daniel P. Berrangé
Cc: peter.maydell, qemu-devel
On 23/09/21 12:00, Philippe Mathieu-Daudé wrote:
> See also "blobs: Only install required (system emulation) files":
> https://lore.kernel.org/qemu-devel/20210323155132.238193-1-f4bug@amsat.org/
Nice and makes a lot of sense. Regarding "there is probably a nicer way
to do this with Meson", I would do without all the variables and do
something like
foreach target : target_dirs
if target in ['...']
blobs_ss.add('...')
elif target in ['...']
blobs_ss.add('...')
endif
endforeach
directly in pc-bios/meson.build.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs
2021-09-23 10:32 ` Paolo Bonzini
@ 2021-09-23 10:44 ` Peter Maydell
2021-09-23 11:40 ` Paolo Bonzini
0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2021-09-23 10:44 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Daniel P. Berrangé, Philippe Mathieu-Daudé, QEMU Developers
On Thu, 23 Sept 2021 at 11:32, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 23/09/21 12:00, Philippe Mathieu-Daudé wrote:
> > See also "blobs: Only install required (system emulation) files":
> > https://lore.kernel.org/qemu-devel/20210323155132.238193-1-f4bug@amsat.org/
>
> Nice and makes a lot of sense. Regarding "there is probably a nicer way
> to do this with Meson", I would do without all the variables and do
> something like
>
> foreach target : target_dirs
> if target in ['...']
> blobs_ss.add('...')
> elif target in ['...']
> blobs_ss.add('...')
> endif
> endforeach
>
> directly in pc-bios/meson.build.
Is it possible also to have meson handle the "symlink the blob from
the source dir to the build dir" which currently configure is doing ?
That would mean we could avoid having effectively two lists of blobs.
(Somebody would need to cross-check that all the blobs the wildcards in
configure are linking in are listed in the meson list.) I guess
the question is whether other parts of the build system assume those
links already exist (ie they don't explicitly declare a dependency
on the existence of the blob and would need to change to do so).
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs
2021-09-23 10:44 ` Peter Maydell
@ 2021-09-23 11:40 ` Paolo Bonzini
0 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2021-09-23 11:40 UTC (permalink / raw)
To: Peter Maydell
Cc: Daniel P. Berrangé, Philippe Mathieu-Daudé, QEMU Developers
On 23/09/21 12:44, Peter Maydell wrote:
> On Thu, 23 Sept 2021 at 11:32, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 23/09/21 12:00, Philippe Mathieu-Daudé wrote:
>>> See also "blobs: Only install required (system emulation) files":
>>> https://lore.kernel.org/qemu-devel/20210323155132.238193-1-f4bug@amsat.org/
>>
>> Nice and makes a lot of sense. Regarding "there is probably a nicer way
>> to do this with Meson", I would do without all the variables and do
>> something like
>>
>> foreach target : target_dirs
>> if target in ['...']
>> blobs_ss.add('...')
>> elif target in ['...']
>> blobs_ss.add('...')
>> endif
>> endforeach
>>
>> directly in pc-bios/meson.build.
>
> Is it possible also to have meson handle the "symlink the blob from
> the source dir to the build dir" which currently configure is doing ?
Yes, though I would have to check the details on how to do that best
(for example whether to keep them at configure time or move them to make).
By the way, I think a lot of the DIRS in configure are not needed
anymore; meson would create them anyway and they're not needed by the
LINKS loop below.
> That would mean we could avoid having effectively two lists of blobs.
> (Somebody would need to cross-check that all the blobs the wildcards in
> configure are linking in are listed in the meson list.) I guess
> the question is whether other parts of the build system assume those
> links already exist (ie they don't explicitly declare a dependency
> on the existence of the blob and would need to change to do so).
Yeah, that's also why in my patch I didn't bother adding the roms
dependency to bios-tables-test only. It's less prone to failure if
they're just built before any qtest is run.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-09-23 11:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 8:15 [PATCH] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs Paolo Bonzini
2021-09-23 8:22 ` Daniel P. Berrangé
2021-09-23 10:00 ` Philippe Mathieu-Daudé
2021-09-23 10:32 ` Paolo Bonzini
2021-09-23 10:44 ` Peter Maydell
2021-09-23 11:40 ` Paolo Bonzini
2021-09-23 10:29 ` Paolo Bonzini
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).