summaryrefslogtreecommitdiff
path: root/test/py/tests/test_android
AgeCommit message (Collapse)Author
2026-01-16test: abootimg: Add test for bootconfig handlingGuillaume La Roque (TI.com)
Add test to verify that androidboot.* parameters are correctly extracted from bootargs and appended to the bootconfig section when using 'abootimg get ramdisk' with boot image v4 and vendor_boot image. The test verifies: - androidboot.* parameters are removed from bootargs - They are appended to the bootconfig section in the ramdisk - Non-androidboot parameters remain in bootargs - The bootconfig trailer is properly updated Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Guillaume La Roque (TI.com) <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mkorpershoek: dropped whitespace changes from original patch] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-12-05test/py: android: Point fdt command to aligned addressesMarek Vasut
Newer versions of libfdt strictly check whether the FDT blob passed to them is at 8-byte aligned offset, if it is not, then the library fails checks with -FDT_ERR_ALIGNMENT . Currently, 'abootimg get dtb --index=1 addr size' may return non 8-byte aligned FDT address which points directly into the abootimg. Copy the result into temporary location before validation to avoid FDT alignment check failure. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-03-15test/py: Drop assigning ubman to consSimon Glass
Now that we have a shorter name, we don't need this sort of thing. Just use ubman instead. Signed-off-by: Simon Glass <[email protected]>
2025-03-15test/py: Drop importing utils as utilSimon Glass
Now that we have a shorter name, we don't need this sort of thing. Drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> # test_android
2025-03-15test/py: Drop u_boot_ prefix on test filesSimon Glass
We know this is U-Boot so the prefix serves no purpose other than to make things longer and harder to read. Drop it and rename the files. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> # test_android / test_dfu
2025-03-15test/py: Shorten u_boot_consoleSimon Glass
This fixture name is quite long and results in lots of verbose code. We know this is U-Boot so the 'u_boot_' part is not necessary. But it is also a bit of a misnomer, since it provides access to all the information available to tests. It is not just the console. It would be too confusing to use con as it would be confused with config and it is probably too short. So shorten it to 'ubman'. Signed-off-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
2024-10-24cmd: bcb: introduce 'ab_dump' command to print BCB block contentDmitry Rokosov
It's really helpful to have the ability to dump BCB block for debugging A/B logic on the board supported this partition schema. Command 'bcb ab_dump' prints all fields of bootloader_control struct including slot_metadata for all presented slots. Output example: ===== > board# bcb ab_dump ubi 0#misc > Read 512 bytes from volume misc to 000000000bf07580 > Read 512 bytes from volume misc to 000000000bf42f40 > Bootloader Control: [misc] > Active Slot: _a > Magic Number: 0x42414342 > Version: 1 > Number of Slots: 2 > Recovery Tries Remaining: 0 > CRC: 0x2c8b50bc (Valid) > > Slot[0] Metadata: > - Priority: 15 > - Tries Remaining: 0 > - Successful Boot: 1 > - Verity Corrupted: 0 > > Slot[1] Metadata: > - Priority: 14 > - Tries Remaining: 7 > - Successful Boot: 0 > - Verity Corrupted: 0 ==== The ab_dump command allows you to display ABC data directly on the U-Boot console. During an A/B test execution, this test verifies the accuracy of each field within the ABC data. Signed-off-by: Dmitry Rokosov <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # vim3_android Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-10-24treewide: bcb: move ab_select command to bcb subcommandsDmitry Rokosov
To enhance code organization, it is beneficial to consolidate all A/B BCB management routines into a single super-command. The 'bcb' command is an excellent candidate for this purpose. This patch integrates the separate 'ab_select' command into the 'bcb' group as the 'ab_select' subcommand, maintaining the same parameter list for consistency. Signed-off-by: Dmitry Rokosov <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # vim3_android Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-02-15avb: move SPDX license identifiers to the first lineIgor Opaniuk
Move SPDX license identifiers to the first line, so it conforms to license placement rule [1]: Placement: The SPDX license identifier in kernel files shall be added at the first possible line in a file which can contain a comment. For the majority of files this is the first line, except for scripts which require the '#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX identifier goes into the second line. [1] https://www.kernel.org/doc/Documentation/process/license-rules.rst Reviewed-by: Mattijs Korpershoek <[email protected]> Signed-off-by: Igor Opaniuk <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2023-06-12global: Use proper project name U-BootMichal Simek
Use proper project name in comments, Kconfig, readmes. Reviewed-by: Neil Armstrong <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/0dbdf0432405c1c38ffca55703b6737a48219e79.1684307818.git.michal.simek@amd.com
2023-04-04test/py: android: extend abootimg testSafae Ouajih
test_abootimg is extended to include the testing of boot images version 4. For this, boot.img and vendor_boot.img have been generated using mkbootimg tool with setting the header version to 4. This tests: - Getting the header version using abootimg - Extracting the load address of the dtb - Extracting the dtb start address in RAM Running test: $ ./test/py/test.py --bd sandbox --build -k test_abootimg Signed-off-by: Safae Ouajih <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]>
2023-01-16sandbox: Enable mmc command and legacy imagesSimon Glass
The mmc command is useful for testing mmc disk images in sandbox, so enable it. We also need to enable legacy images so that we can run tests which use them. Disable it for a few avb tests since MMC is not implemented there yet. Signed-off-by: Simon Glass <[email protected]>
2022-03-02test: Correct pylint errorsSimon Glass
Fix pylint errors in all test. This requires adding a get_spawn() method to the ConsoleBase base, so that its subclass is happy. Signed-off-by: Simon Glass <[email protected]>
2020-02-04test/py: android: Add test for abootimgSam Protsenko
Unit test for 'abootimg' command. Right now it covers dtb/dtbo functionality in Android Boot Image v2, which was added recently. Running test: $ ./test/py/test.py --bd sandbox --build -k test_abootimg shows that 1/1 tests passes successfully. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]>
2020-02-04doc: android: Convert to Sphinx formatSam Protsenko
Convert Android documentation from regular txt format to Sphinx (RST). Also add Android index.rst file and reference it in root index.rst, so that Android documentation is visible. Test: $ make htmldocs $ xdg-open doc/output/index.html Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]>
2019-10-30test/py: Split mark to multiple linesTom Rini
We inconsistently note multiple dependencies today in our tests, sometimes with a single line that declares multiple and sometimes multiple single lines. Current pytest seems to fail on the single line format so change to multiple declarations. Reviewed-by: Stephen Warren <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Stephen Warren <[email protected]> Tested-by: Simon Glass <[email protected]> [on sandbox] Signed-off-by: Tom Rini <[email protected]>
2019-08-07test/py: avb: Move AVB test to android dirSam Protsenko
Signed-off-by: Sam Protsenko <[email protected]>
2019-07-24test/py: Add base test case for A/B updatesRuslan Trofymenko
Add sandbox test for 'ab_select' command. Test: ./test/py/test.py --bd sandbox --build -k test_ab Signed-off-by: Ruslan Trofymenko <[email protected]> Signed-off-by: Igor Opaniuk <[email protected]> Signed-off-by: Sam Protsenko <[email protected]> Reviewed-by: Alistair Strachan <[email protected]> Reviewed-by: Sam Protsenko <[email protected]> Reviewed-by: Simon Glass <[email protected]>