Skip to content

test/py: Rewrite SquashFS commands test suite

Joao Marcos Costa u-boot 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 6 repliesIn review
  2. v23 patches 0 repliesSuperseded
  3. v13 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Add check_mksquashfs_version function to raise an exception if mksquashfs version is too old. I chose to set the required version as 4.4, since it seems to be the most recent one.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3test/py: rewrite common tools for SquashFS teststest/py/tests/test_fs/test_squashfs/sqfs_common.py+193 -642 replies
2/3test/py: rewrite sqfsload command test suitetest/py/tests/test_fs/test_squashfs/test_sqfs_load.py+138 -302 replies
3/3test/py: rewrite sqfsls command test suitetest/py/tests/test_fs/test_squashfs/test_sqfs_ls.py+121 -192 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/3R-b T-b
2/3R-b T-b
3/3R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] test/py: Rewrite SquashFS commands test suite

Hello,

This patch series fixes the following issues:
- poor strategy to check if files were properly loaded
- wrong quoting style for strings
- tests failing at the second run because of a wrong clean-up strategy

Finally, it improves:
- code overall documentation level, with more comments and better naming for functions and variables
- code readability by adding more helper functions
- completeness: more test cases were added for both sqfsls and sqfsload commands

The sqfsload new test suite may fail when testing images with fragmented files if the patch I previously sent (fs/squashfs: fix reading of fragmented files) is not applied, so this patch series depends on it.

Changes since V2:
- Add check_mksquashfs_version function to raise an exception if mksquashfs version is too old. I chose to set the required version as 4.4, since it seems to be the most recent one.

Changes since V1:
- Leave the copyright year as it was (2020) instead of changing it to 2021
- Remove spurious comments and print statements
- Fix the style issues pointed by pylint3

Best regards,
Joao

Joao Marcos Costa (3):
test/py: rewrite common tools for SquashFS tests test/py: rewrite sqfsload command test suite test/py: rewrite sqfsls command test suite

 .../test_fs/test_squashfs/sqfs_common.py      | 257 +++++++++++++-----
 .../test_fs/test_squashfs/test_sqfs_load.py   | 168 ++++++++++--
 .../test_fs/test_squashfs/test_sqfs_ls.py     | 140 ++++++++--
 3 files changed, 452 insertions(+), 113 deletions(-)
Signature · 1 line
2.25.1