Skip to contentSkip to conversation

tests/data/acpi/virt: drop (most) duplicate files.

PATCH In review Michael S. Tsirkin 2 participants 2 messages Mar 2, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/data/acpi/virt: drop (most) duplicate files.

When virt ACPI files were added, lots of duplicates were created because we forgot that there's a no-prefix fallback: e.g. if tests/data/acpi/virt/APIC.memhp is not there then test will use tests/data/acpi/virt/APIC.

Drop these.

These were found with
$find tests/data/acpi/ -type f -exec sha256sum '{}' ';'|sort -d|uniq -w 64 --all-repeated=separate (trick: -d does a dictionary sort so a no-suffix file ends up first).

Note: there are still a bunch of issues with duplicates left even after this.

First pc and q35 are often identical.
Second, sometimes files are identical but not identical to the default fallback, e.g.
tests/data/acpi/pc/SLIT.cphp and tests/data/acpi/pc/SLIT.memhp
or
tests/data/acpi/q35/HMAT.acpihmat-noinitiator and tests/data/acpi/virt/HMAT.acpihmatvirt

Finding a way to deduplicate these is still a TODO item - softlinks maybe?

We also need to make rebuild-expected-aml.sh smarter about not creating these duplicates in the 1st place.

And maybe we should use softlinks instead of relying on a fallback to make it explicit what version does each test expect?

---
 tests/data/acpi/virt/APIC.memhp   | Bin 172 -> 0 bytes
 tests/data/acpi/virt/APIC.numamem | Bin 172 -> 0 bytes
 tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 0 bytes
 tests/data/acpi/virt/FACP.memhp   | Bin 276 -> 0 bytes
 tests/data/acpi/virt/FACP.numamem | Bin 276 -> 0 bytes
 tests/data/acpi/virt/GTDT.memhp   | Bin 96 -> 0 bytes
 tests/data/acpi/virt/GTDT.numamem | Bin 96 -> 0 bytes
 tests/data/acpi/virt/IORT.memhp   | Bin 128 -> 0 bytes
 tests/data/acpi/virt/IORT.numamem | Bin 128 -> 0 bytes
 tests/data/acpi/virt/IORT.pxb     | Bin 128 -> 0 bytes
 tests/data/acpi/virt/MCFG.memhp   | Bin 60 -> 0 bytes
 tests/data/acpi/virt/MCFG.numamem | Bin 60 -> 0 bytes
 tests/data/acpi/virt/SPCR.memhp   | Bin 80 -> 0 bytes
 tests/data/acpi/virt/SPCR.numamem | Bin 80 -> 0 bytes
 14 files changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 tests/data/acpi/virt/APIC.memhp
 delete mode 100644 tests/data/acpi/virt/APIC.numamem
 delete mode 100644 tests/data/acpi/virt/DSDT.numamem
 delete mode 100644 tests/data/acpi/virt/FACP.memhp
 delete mode 100644 tests/data/acpi/virt/FACP.numamem
 delete mode 100644 tests/data/acpi/virt/GTDT.memhp
 delete mode 100644 tests/data/acpi/virt/GTDT.numamem
 delete mode 100644 tests/data/acpi/virt/IORT.memhp
 delete mode 100644 tests/data/acpi/virt/IORT.numamem
 delete mode 100644 tests/data/acpi/virt/IORT.pxb
 delete mode 100644 tests/data/acpi/virt/MCFG.memhp
 delete mode 100644 tests/data/acpi/virt/MCFG.numamem
 delete mode 100644 tests/data/acpi/virt/SPCR.memhp
 delete mode 100644 tests/data/acpi/virt/SPCR.numamem
tests/data/acpi/virt/APIC.memhp deleted binary +0 -0
deleted file mode 100644
index 179d274770a23209b949c90a929525e22368568b..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/APIC.numamem deleted binary +0 -0
deleted file mode 100644
index 179d274770a23209b949c90a929525e22368568b..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/DSDT.numamem deleted binary +0 -0
deleted file mode 100644
index c47503990715d389914fdf9c8bccb510761741ac..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/FACP.memhp deleted binary +0 -0
deleted file mode 100644
index ac05c35a69451519bd1152c54d1e741af36390f5..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/FACP.numamem deleted binary +0 -0
deleted file mode 100644
index ac05c35a69451519bd1152c54d1e741af36390f5..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/GTDT.memhp deleted binary +0 -0
deleted file mode 100644
index 6f8cb9b8f30b55f4c93fe515982621e3db50feb2..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/GTDT.numamem deleted binary +0 -0
deleted file mode 100644
index 6f8cb9b8f30b55f4c93fe515982621e3db50feb2..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/IORT.memhp deleted binary +0 -0
deleted file mode 100644
index 7efd0ce8a6b3928efa7e1373f688ab4c5f50543b..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/IORT.numamem deleted binary +0 -0
deleted file mode 100644
index 7efd0ce8a6b3928efa7e1373f688ab4c5f50543b..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/IORT.pxb deleted binary +0 -0
deleted file mode 100644
index 7efd0ce8a6b3928efa7e1373f688ab4c5f50543b..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/MCFG.memhp deleted binary +0 -0
deleted file mode 100644
index f4ae3203a4e9258a397c9912332178640209637b..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/MCFG.numamem deleted binary +0 -0
deleted file mode 100644
index f4ae3203a4e9258a397c9912332178640209637b..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/SPCR.memhp deleted binary +0 -0
deleted file mode 100644
index 24e0a579e7d73f432a614380e29aa95113344186..0000000000000000000000000000000000000000
GIT binary patch
tests/data/acpi/virt/SPCR.numamem deleted binary +0 -0
deleted file mode 100644
index 24e0a579e7d73f432a614380e29aa95113344186..0000000000000000000000000000000000000000
GIT binary patch
Signature · 1 line
MST
Reviewed-by on v1 1/1
#1 lore raw
Quoted 46 lines · Michael S. Tsirkin

When virt ACPI files were added, lots of duplicates were created because we forgot that there's a no-prefix fallback: e.g. if tests/data/acpi/virt/APIC.memhp is not there then test will use tests/data/acpi/virt/APIC.

Drop these.

These were found with
$find tests/data/acpi/ -type f -exec sha256sum '{}' ';'|sort -d|uniq -w 64 --all-repeated=separate (trick: -d does a dictionary sort so a no-suffix file ends up first).

Note: there are still a bunch of issues with duplicates left even after this.

First pc and q35 are often identical.
Second, sometimes files are identical but not identical to the default fallback, e.g.
tests/data/acpi/pc/SLIT.cphp and tests/data/acpi/pc/SLIT.memhp
or
tests/data/acpi/q35/HMAT.acpihmat-noinitiator and tests/data/acpi/virt/HMAT.acpihmatvirt

Finding a way to deduplicate these is still a TODO item - softlinks maybe?

We also need to make rebuild-expected-aml.sh smarter about not creating these duplicates in the 1st place.

And maybe we should use softlinks instead of relying on a fallback to make it explicit what version does each test expect?

---
  tests/data/acpi/virt/APIC.memhp   | Bin 172 -> 0 bytes
  tests/data/acpi/virt/APIC.numamem | Bin 172 -> 0 bytes
  tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 0 bytes
  tests/data/acpi/virt/FACP.memhp   | Bin 276 -> 0 bytes
  tests/data/acpi/virt/FACP.numamem | Bin 276 -> 0 bytes
  tests/data/acpi/virt/GTDT.memhp   | Bin 96 -> 0 bytes
  tests/data/acpi/virt/GTDT.numamem | Bin 96 -> 0 bytes
  tests/data/acpi/virt/IORT.memhp   | Bin 128 -> 0 bytes
  tests/data/acpi/virt/IORT.numamem | Bin 128 -> 0 bytes
  tests/data/acpi/virt/IORT.pxb     | Bin 128 -> 0 bytes
  tests/data/acpi/virt/MCFG.memhp   | Bin 60 -> 0 bytes
  tests/data/acpi/virt/MCFG.numamem | Bin 60 -> 0 bytes
  tests/data/acpi/virt/SPCR.memhp   | Bin 80 -> 0 bytes
  tests/data/acpi/virt/SPCR.numamem | Bin 80 -> 0 bytes
  14 files changed, 0 insertions(+), 0 deletions(-)
Quoted 14 lines

delete mode 100644 tests/data/acpi/virt/APIC.memhp delete mode 100644 tests/data/acpi/virt/APIC.numamem delete mode 100644 tests/data/acpi/virt/DSDT.numamem delete mode 100644 tests/data/acpi/virt/FACP.memhp delete mode 100644 tests/data/acpi/virt/FACP.numamem delete mode 100644 tests/data/acpi/virt/GTDT.memhp delete mode 100644 tests/data/acpi/virt/GTDT.numamem delete mode 100644 tests/data/acpi/virt/IORT.memhp delete mode 100644 tests/data/acpi/virt/IORT.numamem delete mode 100644 tests/data/acpi/virt/IORT.pxb delete mode 100644 tests/data/acpi/virt/MCFG.memhp delete mode 100644 tests/data/acpi/virt/MCFG.numamem delete mode 100644 tests/data/acpi/virt/SPCR.memhp delete mode 100644 tests/data/acpi/virt/SPCR.numamem