Skip to content

Commit aebce73

Browse files
igoropaniukandersson
authored andcommitted
tests: shrink oversized fixture binaries from 1 GB to 16 MB total
The fixture generator was creating efi.bin (512 MB) and rootfs.img (500 MB) -- sizes inherited from a real-world device layout but with no bearing on what the integration tests actually exercise. Both the flashmap dry-run and the VIP digest test only need qdl to parse the XML/JSON descriptors, walk the program list, and (for VIP) hash the backing files. Whether the backing files are 8 MB or 512 MB makes no difference to the code paths under test. The previous switch to sparse files removed the dd write cost, but zip still has to scan and CRC32 every byte of input regardless of whether the bytes come from a hole. On the slow macos-15-intel CI runner that scan was the new dominant cost and continued to push both tests past meson's default 30 s timeout. Drop efi.bin and rootfs.img to 8 MB each. Adjust rawprogram0.xml so that the efi partition descriptor matches the new file size (size_in_KB="8192.0", num_partition_sectors="2048") and rootfs's start_sector / start_byte_hex follow on at sector 2054 (0x806000). The other partition descriptors and patch entries are unaffected. Local test run drops from ~5 s to ~0.25 s (combined). The slow Intel CI runner should now have plenty of headroom under the 30 s default timeout. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
1 parent b551397 commit aebce73

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/data/generate_flat_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ create_file_with_size() {
1919
}
2020

2121
create_file_with_size prog_firehose_ddr.elf 20
22-
create_file_with_size efi.bin 524288
22+
create_file_with_size efi.bin 8192
2323
create_file_with_size gpt_backup0.bin 20
2424
create_file_with_size gpt_backup1.bin 20
2525
create_file_with_size gpt_main0.bin 24
2626
create_file_with_size gpt_main1.bin 24
27-
create_file_with_size rootfs.img 512000
27+
create_file_with_size rootfs.img 8192
2828
create_file_with_size xbl_config.elf 320
2929
create_file_with_size xbl.elf 800
3030

tests/data/rawprogram0.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<data>
33
<!--NOTE: This is an ** Autogenerated file **-->
44
<!--NOTE: Sector size is 4096bytes-->
5-
<program start_sector="6" size_in_KB="524288.0" physical_partition_number="0" partofsingleimage="false" file_sector_offset="0" num_partition_sectors="131072" readbackverify="false" filename="efi.bin" sparse="false" start_byte_hex="0x6000" SECTOR_SIZE_IN_BYTES="4096" label="efi"/>
6-
<program start_sector="131078" size_in_KB="0" physical_partition_number="0" partofsingleimage="false" file_sector_offset="0" num_partition_sectors="0" readbackverify="false" filename="rootfs.img" sparse="false" start_byte_hex="0x20006000" SECTOR_SIZE_IN_BYTES="4096" label="rootfs"/>
5+
<program start_sector="6" size_in_KB="8192.0" physical_partition_number="0" partofsingleimage="false" file_sector_offset="0" num_partition_sectors="2048" readbackverify="false" filename="efi.bin" sparse="false" start_byte_hex="0x6000" SECTOR_SIZE_IN_BYTES="4096" label="efi"/>
6+
<program start_sector="2054" size_in_KB="0" physical_partition_number="0" partofsingleimage="false" file_sector_offset="0" num_partition_sectors="0" readbackverify="false" filename="rootfs.img" sparse="false" start_byte_hex="0x806000" SECTOR_SIZE_IN_BYTES="4096" label="rootfs"/>
77
<program start_sector="0" size_in_KB="24.0" physical_partition_number="0" partofsingleimage="true" file_sector_offset="0" num_partition_sectors="6" readbackverify="false" filename="gpt_main0.bin" sparse="false" start_byte_hex="0x0" SECTOR_SIZE_IN_BYTES="4096" label="PrimaryGPT"/>
88
<program start_sector="NUM_DISK_SECTORS-5." size_in_KB="20.0" physical_partition_number="0" partofsingleimage="true" file_sector_offset="0" num_partition_sectors="5" readbackverify="false" filename="gpt_backup0.bin" sparse="false" start_byte_hex="(4096*NUM_DISK_SECTORS)-20480." SECTOR_SIZE_IN_BYTES="4096" label="BackupGPT"/>
99
</data>

tests/test_vip_generation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ trap cleanup EXIT
3636

3737
QDL_PATH=$builddir
3838
VIP_PATH=${FLAT_BUILD}/vip
39-
EXPECTED_DIGEST="d93fc596a037abe4977f50ca68e1bf57377299a496cb1436a9421579517cef13"
39+
EXPECTED_DIGEST="3ca3c745c7bf60d9f51626ad819dce1e14788bc094c258da6656b0a469afbf15"
4040
VIP_TABLE_FILE=${VIP_PATH}/DigestsToSign.bin
4141

4242
uname_out="$(uname -s)"

0 commit comments

Comments
 (0)