Skip to content

Conversation

lool
Copy link
Contributor

@lool lool commented Apr 13, 2025

Hi,

The wipe_rawprogram_*.xml and WIPE_PARTITIONS.xml might reference a
zeros_33sectors.bin, but this file wasn't created as part of the ptool
output, contrarily to the other zeros
files.

Add an integration test to catch this and generate the missing file.

  • Makefile: check target is .PHONY
  • Add integration test to catch missing files
  • ptool: Generate missing 33 sectors empty file

lool added 3 commits April 13, 2025 12:29
Move static analysis test to a new lint target.

Signed-off-by: Loïc Minier <[email protected]>
@lool lool requested a review from ndechesne as a code owner April 13, 2025 12:04
@ricardosalveti
Copy link
Contributor

Should we also change https://github.com/qualcomm-linux/qcom-ptool/blob/main/.github/workflows/build.yml#L19 to cover check/lint/integration?

@lool
Copy link
Contributor Author

lool commented Apr 15, 2025

🤷 the testsuite was passing on macOS because it has a case insensitive filesystem by default, but running it in the PR (on Linux) uncovered that there are a bunch of missing zeros_33sectorS.bin files too. Reviewing the code, I'm relatively confident that it's exactly the same usage as zeros_33sectors.bin, and just a typo – 34 and 33 are the sizes in sector of the primary and backup GPT.

I've also checked the output, and zeros_33sectorS.bin is used in partitions that either smaller or much larger than 33 sectors, so I'm assuming it bears no important that it matches any exact size.

% grep -r zeros_33sectorS | sed -n 's/.*size_in_KB="\([^"]*\)".*num_partition_sectors="\([^".]*\)".*/size_in_KB=\1 num_partition_sectors=\2/p'
size_in_KB=3604.0 num_partition_sectors=901
size_in_KB=512.0 num_partition_sectors=128
size_in_KB=3604.0 num_partition_sectors=901
size_in_KB=512.0 num_partition_sectors=128
size_in_KB=104.0 num_partition_sectors=26
size_in_KB=128.0 num_partition_sectors=32
size_in_KB=1024.0 num_partition_sectors=256
size_in_KB=1024.0 num_partition_sectors=256
size_in_KB=524288.0 num_partition_sectors=131072
[...]

Install pycodestyle dependency and for running lint checks first.

Signed-off-by: Loïc Minier <[email protected]>
@ricardosalveti ricardosalveti merged commit 16b43c9 into qualcomm-linux:main Apr 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants