[PATCH v3 2/3] test/py: rewrite sqfsload command test suite

Simon Glass sjg at chromium.org
Mon Jul 5 17:29:42 CEST 2021


On Wed, 30 Jun 2021 at 16:45, Joao Marcos Costa <jmcosta944 at gmail.com> wrote:
>
> The previous strategy to know if a file was correctly loaded was to
> check for how many bytes were read and compare it against the file's
> original size. Since this is not a good solution, replace it by
> comparing the checksum of the loaded bytes against the original file's
> checksum. Add more test cases: files at a sub-directory and non-existent
> file.
>
> Signed-off-by: Joao Marcos Costa <jmcosta944 at gmail.com>
> ---
>  .../test_fs/test_squashfs/test_sqfs_load.py   | 168 ++++++++++++++----
>  1 file changed, 138 insertions(+), 30 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg at chromium.org>

A few nits if you end up sending a new version:
- Python has a built-in hashlib that does md5
- Should be no space after the starting """ for a function comment


More information about the U-Boot mailing list