On Fri, 1 Jul 2022 12:26:16 -0400 "Michael S. Tsirkin" <m...@redhat.com> wrote:
> On Fri, Jul 01, 2022 at 09:35:00AM -0400, Igor Mammedov wrote: > > HPET AML doesn't depend on piix4 nor q35, move code buiding it > > to common scope to avoid duplication. > > > > Signed-off-by: Igor Mammedov <imamm...@redhat.com> > > Apropos, tests/data/acpi/rebuild-expected-aml.sh ignores the > fact that some tables might be identical. Also, there's no > way to reuse expected files between machines. And so we have: > > > [qemu]$ find tests/data/acpi -type f -exec sha256sum '{}' ';'|sort [...] > > > It's easy to fix up duplications within virt. But I am not 100% sure how > fix up duplication between q35 and pc. [...] > Then we could maybe use the directory "pc" for files common to i440fx > and q35. Maybe just teach the test to look under tests/data/acpi/x86 > too? And I think we should teach tests/data/acpi/rebuild-expected-aml.sh > to check for duplicates and at least warn the user. Probably duplicates in 'virt' mostly due to combination of not knowing that there is a fallback lookup (which is hidden in the code) and simplistic way tests/data/acpi/rebuild-expected-aml.sh rebuilds tables. As you suggest, rebuild-expected-aml.sh can be improved to warn or even better drop duplicates if found. As for reusing tables between different machine types, alternatively we can add explicit remapping rules (possibly auto-generated) versus currently used implicit fallback approach.