]> git.proxmox.com Git - mirror_qemu.git/commit
tests/acpi/bios-tables-test: do not write new blobs unless there are changes
authorAni Sinha <anisinha@redhat.com>
Tue, 7 Nov 2023 04:49:51 +0000 (10:19 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 2 Dec 2023 20:56:49 +0000 (15:56 -0500)
commitde35244e99ff1c45a7b07f4024b8a70843d0f79c
tree6d80af6072d77565ca65373b18794f515daa72c5
parentcadfc7293977ecadc2d6c48d7cffc553ed2f85f1
tests/acpi/bios-tables-test: do not write new blobs unless there are changes

When dumping table blobs using rebuild-expected-aml.sh, table blobs from all
test variants are dumped regardless of whether there are any actual changes to
the tables or not. This creates lot of new files for various test variants that
are not part of the git repository. This is because we do not check in all table
blobs for all test variants into the repository. Only those blobs for those
variants that are different from the generic test-variant agnostic blob are
checked in.

This change makes the test smarter by checking if at all there are any changes
in the tables from the checked-in gold master blobs and take actions
accordingly.

When there are no changes:
 - No new table blobs would be written.
 - Existing table blobs will be refreshed (git diff will show no changes).
When there are changes:
 - New table blob files will be dumped.
 - Existing table blobs will be refreshed (git diff will show that the files
   changed, asl diff will show the actual changes).
When new tables are introduced:
 - Zero byte empty file blobs for new tables as instructed in the header of
   bios-tables-test.c will be regenerated to actual table blobs.

This would make analyzing changes to tables less confusing and there would
be no need to clean useless untracked files when there are no table changes.

CC: peter.maydell@linaro.org
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Message-Id: <20231107044952.5461-1-anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
tests/qtest/bios-tables-test.c