qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git
@ 2023-10-31 13:08 Peter Maydell
  2023-10-31 13:51 ` Michael S. Tsirkin
  2023-10-31 13:54 ` Ani Sinha
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2023-10-31 13:08 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Michael S. Tsirkin, Igor Mammedov, Ani Sinha

I'm doing a patchset that requires rebuilding the bios-tables-test
expected-data files for the arm virt board. The instructions in
bios-tables-test.c say that you should run rebuild-expected-aml.sh
to update the data files. But running that script generates a lot
of new data files that don't exist in git at all and are unrelated
to the change I'm making:

        tests/data/acpi/virt/APIC.memhp
        tests/data/acpi/virt/APIC.numamem
        tests/data/acpi/virt/APIC.pxb
        tests/data/acpi/virt/DBG2.acpihmatvirt
        tests/data/acpi/virt/DBG2.memhp
        tests/data/acpi/virt/DBG2.numamem
        tests/data/acpi/virt/DBG2.pxb
        tests/data/acpi/virt/DBG2.topology
        tests/data/acpi/virt/DSDT.numamem
        tests/data/acpi/virt/FACP.acpihmatvirt
        tests/data/acpi/virt/FACP.memhp
        tests/data/acpi/virt/FACP.numamem
        tests/data/acpi/virt/FACP.pxb
        tests/data/acpi/virt/FACP.topology
        tests/data/acpi/virt/GTDT.acpihmatvirt
        tests/data/acpi/virt/GTDT.memhp
        tests/data/acpi/virt/GTDT.numamem
        tests/data/acpi/virt/GTDT.pxb
        tests/data/acpi/virt/GTDT.topology
        tests/data/acpi/virt/IORT.acpihmatvirt
        tests/data/acpi/virt/IORT.memhp
        tests/data/acpi/virt/IORT.numamem
        tests/data/acpi/virt/IORT.pxb
        tests/data/acpi/virt/IORT.topology
        tests/data/acpi/virt/MCFG.acpihmatvirt
        tests/data/acpi/virt/MCFG.memhp
        tests/data/acpi/virt/MCFG.numamem
        tests/data/acpi/virt/MCFG.pxb
        tests/data/acpi/virt/MCFG.topology
        tests/data/acpi/virt/PPTT.memhp
        tests/data/acpi/virt/PPTT.numamem
        tests/data/acpi/virt/PPTT.pxb
        tests/data/acpi/virt/SPCR.acpihmatvirt
        tests/data/acpi/virt/SPCR.memhp
        tests/data/acpi/virt/SPCR.numamem
        tests/data/acpi/virt/SPCR.pxb
        tests/data/acpi/virt/SPCR.topology

Does the script need fixing to not generate these files, or should
they exist in the git repo?

thanks
-- PMM


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

* Re: tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git
  2023-10-31 13:08 tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git Peter Maydell
@ 2023-10-31 13:51 ` Michael S. Tsirkin
  2023-10-31 14:01   ` Ani Sinha
  2023-10-31 13:54 ` Ani Sinha
  1 sibling, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2023-10-31 13:51 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, Igor Mammedov, Ani Sinha

On Tue, Oct 31, 2023 at 01:08:01PM +0000, Peter Maydell wrote:
> I'm doing a patchset that requires rebuilding the bios-tables-test
> expected-data files for the arm virt board. The instructions in
> bios-tables-test.c say that you should run rebuild-expected-aml.sh
> to update the data files. But running that script generates a lot
> of new data files that don't exist in git at all and are unrelated
> to the change I'm making:
> 
>         tests/data/acpi/virt/APIC.memhp
>         tests/data/acpi/virt/APIC.numamem
>         tests/data/acpi/virt/APIC.pxb
>         tests/data/acpi/virt/DBG2.acpihmatvirt
>         tests/data/acpi/virt/DBG2.memhp
>         tests/data/acpi/virt/DBG2.numamem
>         tests/data/acpi/virt/DBG2.pxb
>         tests/data/acpi/virt/DBG2.topology
>         tests/data/acpi/virt/DSDT.numamem
>         tests/data/acpi/virt/FACP.acpihmatvirt
>         tests/data/acpi/virt/FACP.memhp
>         tests/data/acpi/virt/FACP.numamem
>         tests/data/acpi/virt/FACP.pxb
>         tests/data/acpi/virt/FACP.topology
>         tests/data/acpi/virt/GTDT.acpihmatvirt
>         tests/data/acpi/virt/GTDT.memhp
>         tests/data/acpi/virt/GTDT.numamem
>         tests/data/acpi/virt/GTDT.pxb
>         tests/data/acpi/virt/GTDT.topology
>         tests/data/acpi/virt/IORT.acpihmatvirt
>         tests/data/acpi/virt/IORT.memhp
>         tests/data/acpi/virt/IORT.numamem
>         tests/data/acpi/virt/IORT.pxb
>         tests/data/acpi/virt/IORT.topology
>         tests/data/acpi/virt/MCFG.acpihmatvirt
>         tests/data/acpi/virt/MCFG.memhp
>         tests/data/acpi/virt/MCFG.numamem
>         tests/data/acpi/virt/MCFG.pxb
>         tests/data/acpi/virt/MCFG.topology
>         tests/data/acpi/virt/PPTT.memhp
>         tests/data/acpi/virt/PPTT.numamem
>         tests/data/acpi/virt/PPTT.pxb
>         tests/data/acpi/virt/SPCR.acpihmatvirt
>         tests/data/acpi/virt/SPCR.memhp
>         tests/data/acpi/virt/SPCR.numamem
>         tests/data/acpi/virt/SPCR.pxb
>         tests/data/acpi/virt/SPCR.topology
> 
> Does the script need fixing to not generate these files, or should
> they exist in the git repo?

The script is not smart enough to notice that files are identical - e.g.
tests/data/acpi/virt/PPTT are all the same so we just have one of these
- and so all the copies don't need to be there. Just check and then blow
away the unnecessary files.

-- 
MST



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

* Re: tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git
  2023-10-31 13:08 tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git Peter Maydell
  2023-10-31 13:51 ` Michael S. Tsirkin
@ 2023-10-31 13:54 ` Ani Sinha
  2023-10-31 13:57   ` Peter Maydell
  1 sibling, 1 reply; 5+ messages in thread
From: Ani Sinha @ 2023-10-31 13:54 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, Michael S. Tsirkin, Igor Mammedov



> On 31-Oct-2023, at 6:38 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> I'm doing a patchset that requires rebuilding the bios-tables-test
> expected-data files for the arm virt board. The instructions in
> bios-tables-test.c say that you should run rebuild-expected-aml.sh

This script seems to be only rebuilding the blobs for x86 and aarch64 not arm? So is it at all needed to run this?

> to update the data files. But running that script generates a lot
> of new data files that don't exist in git at all and are unrelated
> to the change I'm making:
> 
>        tests/data/acpi/virt/APIC.memhp
>        tests/data/acpi/virt/APIC.numamem
>        tests/data/acpi/virt/APIC.pxb
>        tests/data/acpi/virt/DBG2.acpihmatvirt
>        tests/data/acpi/virt/DBG2.memhp
>        tests/data/acpi/virt/DBG2.numamem
>        tests/data/acpi/virt/DBG2.pxb
>        tests/data/acpi/virt/DBG2.topology
>        tests/data/acpi/virt/DSDT.numamem
>        tests/data/acpi/virt/FACP.acpihmatvirt
>        tests/data/acpi/virt/FACP.memhp
>        tests/data/acpi/virt/FACP.numamem
>        tests/data/acpi/virt/FACP.pxb
>        tests/data/acpi/virt/FACP.topology
>        tests/data/acpi/virt/GTDT.acpihmatvirt
>        tests/data/acpi/virt/GTDT.memhp
>        tests/data/acpi/virt/GTDT.numamem
>        tests/data/acpi/virt/GTDT.pxb
>        tests/data/acpi/virt/GTDT.topology
>        tests/data/acpi/virt/IORT.acpihmatvirt
>        tests/data/acpi/virt/IORT.memhp
>        tests/data/acpi/virt/IORT.numamem
>        tests/data/acpi/virt/IORT.pxb
>        tests/data/acpi/virt/IORT.topology
>        tests/data/acpi/virt/MCFG.acpihmatvirt
>        tests/data/acpi/virt/MCFG.memhp
>        tests/data/acpi/virt/MCFG.numamem
>        tests/data/acpi/virt/MCFG.pxb
>        tests/data/acpi/virt/MCFG.topology
>        tests/data/acpi/virt/PPTT.memhp
>        tests/data/acpi/virt/PPTT.numamem
>        tests/data/acpi/virt/PPTT.pxb
>        tests/data/acpi/virt/SPCR.acpihmatvirt
>        tests/data/acpi/virt/SPCR.memhp
>        tests/data/acpi/virt/SPCR.numamem
>        tests/data/acpi/virt/SPCR.pxb
>        tests/data/acpi/virt/SPCR.topology
> 
> Does the script need fixing to not generate these files, or should
> they exist in the git repo?
> 
> thanks
> -- PMM
> 



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

* Re: tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git
  2023-10-31 13:54 ` Ani Sinha
@ 2023-10-31 13:57   ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2023-10-31 13:57 UTC (permalink / raw)
  To: Ani Sinha; +Cc: QEMU Developers, Michael S. Tsirkin, Igor Mammedov

On Tue, 31 Oct 2023 at 13:54, Ani Sinha <anisinha@redhat.com> wrote:
>
>
>
> > On 31-Oct-2023, at 6:38 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > I'm doing a patchset that requires rebuilding the bios-tables-test
> > expected-data files for the arm virt board. The instructions in
> > bios-tables-test.c say that you should run rebuild-expected-aml.sh
>
> This script seems to be only rebuilding the blobs for x86 and aarch64 not arm? So is it at all needed to run this?

I wasn't trying to be precise that I only meant 32-bit arm.
The change in question affects the 64-bit ACPI tables.

-- PMM


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

* Re: tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git
  2023-10-31 13:51 ` Michael S. Tsirkin
@ 2023-10-31 14:01   ` Ani Sinha
  0 siblings, 0 replies; 5+ messages in thread
From: Ani Sinha @ 2023-10-31 14:01 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Peter Maydell, QEMU Developers, Igor Mammedov



> On 31-Oct-2023, at 7:21 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> 
> On Tue, Oct 31, 2023 at 01:08:01PM +0000, Peter Maydell wrote:
>> I'm doing a patchset that requires rebuilding the bios-tables-test
>> expected-data files for the arm virt board. The instructions in
>> bios-tables-test.c say that you should run rebuild-expected-aml.sh
>> to update the data files. But running that script generates a lot
>> of new data files that don't exist in git at all and are unrelated
>> to the change I'm making:
>> 
>>        tests/data/acpi/virt/APIC.memhp
>>        tests/data/acpi/virt/APIC.numamem
>>        tests/data/acpi/virt/APIC.pxb
>>        tests/data/acpi/virt/DBG2.acpihmatvirt
>>        tests/data/acpi/virt/DBG2.memhp
>>        tests/data/acpi/virt/DBG2.numamem
>>        tests/data/acpi/virt/DBG2.pxb
>>        tests/data/acpi/virt/DBG2.topology
>>        tests/data/acpi/virt/DSDT.numamem
>>        tests/data/acpi/virt/FACP.acpihmatvirt
>>        tests/data/acpi/virt/FACP.memhp
>>        tests/data/acpi/virt/FACP.numamem
>>        tests/data/acpi/virt/FACP.pxb
>>        tests/data/acpi/virt/FACP.topology
>>        tests/data/acpi/virt/GTDT.acpihmatvirt
>>        tests/data/acpi/virt/GTDT.memhp
>>        tests/data/acpi/virt/GTDT.numamem
>>        tests/data/acpi/virt/GTDT.pxb
>>        tests/data/acpi/virt/GTDT.topology
>>        tests/data/acpi/virt/IORT.acpihmatvirt
>>        tests/data/acpi/virt/IORT.memhp
>>        tests/data/acpi/virt/IORT.numamem
>>        tests/data/acpi/virt/IORT.pxb
>>        tests/data/acpi/virt/IORT.topology
>>        tests/data/acpi/virt/MCFG.acpihmatvirt
>>        tests/data/acpi/virt/MCFG.memhp
>>        tests/data/acpi/virt/MCFG.numamem
>>        tests/data/acpi/virt/MCFG.pxb
>>        tests/data/acpi/virt/MCFG.topology
>>        tests/data/acpi/virt/PPTT.memhp
>>        tests/data/acpi/virt/PPTT.numamem
>>        tests/data/acpi/virt/PPTT.pxb
>>        tests/data/acpi/virt/SPCR.acpihmatvirt
>>        tests/data/acpi/virt/SPCR.memhp
>>        tests/data/acpi/virt/SPCR.numamem
>>        tests/data/acpi/virt/SPCR.pxb
>>        tests/data/acpi/virt/SPCR.topology
>> 
>> Does the script need fixing to not generate these files, or should
>> they exist in the git repo?
> 
> The script is not smart enough to notice that files are identical - e.g.
> tests/data/acpi/virt/PPTT are all the same so we just have one of these
> - and so all the copies don't need to be there. 

See this in bios-tables-test.c

       if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
            exp_sdt.aml_file = aml_file;
        } else if (*ext != '\0') {
            /* try fallback to generic (extension less) expected file */
            ext = "";
            g_free(aml_file);
            goto try_again;
        }


Basically we need to make the dumping part of the code smarter. I will try something if I am too bored :-)



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

end of thread, other threads:[~2023-10-31 14:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 13:08 tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git Peter Maydell
2023-10-31 13:51 ` Michael S. Tsirkin
2023-10-31 14:01   ` Ani Sinha
2023-10-31 13:54 ` Ani Sinha
2023-10-31 13:57   ` Peter Maydell

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