summaryrefslogtreecommitdiff
path: root/test/py/tests/test_spi.py
AgeCommit message (Collapse)Author
2025-04-24test/py: spi: Prevent to overwrite the reserved memoryLove Kumar
Update SPI negative tests to prevent SF command from overwriting the reserved memory area. Signed-off-by: Love Kumar <love.kumar@amd.com>
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 <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # 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 <sjg@chromium.org> Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
2025-02-21test/py: Rework test_spi.py to assert we found outputTom Rini
When running a newer version of pylint it will complain that page_size may be used before being assignment. Looking deeper what is going on is that we could run in to the case where the regex we run for any of the flash information fails but since we don't have a result, we don't check it either. In the case of the rest of the numerical values we then have some assignment (multiplying by some value) and so pylint doesn't complain. Rework things to assert that each regex has a result and so failure will stop the test and we won't have any use before assignment. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-15test/py: spi: Rephrase the warning/error messagesLove Kumar
Rephrasing the error and warning messages to be more meaningful and clear. Signed-off-by: Love Kumar <love.kumar@amd.com>
2024-11-13test: Correct regex string in test_spiSimon Glass
Use an 'r' string to avoid a warning: test/py/tests/test_spi.py:698: DeprecationWarning: invalid escape sequence '\s' Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Love Kumar <love.kumar@amd.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-11-01test/py: spi: prevent overwriting relocation memoryPadmarao Begari
Update spi negative test case to prevent SF command from overwriting relocation memory area. Signed-off-by: Padmarao Begari <padmarao.begari@amd.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Love Kumar <love.kumar@amd.com>
2024-09-10test/py: spi: Set the expected error messageLove Kumar
If erase/write/read size is 0 then it throws the mentioned error message when debug message ie enabled as per 899fb5aa8bec ("cmd: sf/nand: Print and return failure when 0 length is passed"), setting it to None as debug message is not enabled by default for testing. Signed-off-by: Love Kumar <love.kumar@amd.com>
2024-08-27test/py: spi: Add tests for SPI flash deviceLove Kumar
Add test cases for sf commands to verify various SPI flash operations such as erase, write and read. It also adds qspi lock unlock cases. This test relies on boardenv_* configurations to run it for different SPI flash family such as single SPI, QSPI, and OSPI. Signed-off-by: Love Kumar <love.kumar@amd.com>