public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v4 0/7] add inital SF tests
@ 2018-03-14 23:15 Liam Beguin
  2018-03-14 23:15 ` [U-Boot] [PATCH v4 1/7] spi: spi_flash: do not fail silently on bad user input Liam Beguin
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Liam Beguin @ 2018-03-14 23:15 UTC (permalink / raw)
  To: u-boot

Hi all,

This is the inital step to adding tests for the SF subsystem plus very
minor fixes. It is based on work I found on the mailing list[1].
For now, it doesn't do much but I plan on adding code to reset the flash
to its initial state (based on an env flag) and more code to test the
`sf protect` subcommand (which is the main goal of this series).
I'm sending it now to make sure it's headed in the right direction.

Base on Stephen's comment[2], I haven't added the radomized features.
I'll see how this iteration goes and maybe add it later.

Changes since v3:
 - add Xilinx copyright notice since it's loosely based on their patch
 - add Reviewed-by tags

Changes since v2:
 - remove double blank lines
 - in sf_prepare, fix the way `speed` is read from env__sf_config
 - in sf_prepare, fix assert of env__sf_config['offset']
 - in sf_prepare, do not fail if env__sf_config['crc32'] == 0
 - in sf_{read,update}, `pattern` is in bytes. Make sure md/mw use the
   right sizes.
 - in sf_{read,update}, rename `crc_read` to `crc_pattern` when
   appropriate
 - add missing pytest.mark on test_sf_update

Changes since v1:
 - remove unnecessary skip flag from environment
 - move crc32() to u_boot_utils.py and add extra checks
 - rewrite sf_prepare to return a dict of parameter
 - use assert instead of pytest.fail
 - remove verbose from sf_prepare()
 - update documentation
 - improve readability
 - use ' consistently instead of "
 - use sf_read() in test_sf_read()
 - rename crc variables
 - add speed parameter with optional random range
 - allow `sf read` to write at 0x00

Thanks,
Liam Beguin

[ 1 ] https://patchwork.ozlabs.org/patch/623061/
[ 2 ] https://lists.denx.de/pipermail/u-boot/2018-March/321688.html

Liam Beguin (7):
  spi: spi_flash: do not fail silently on bad user input
  cmd: sf: fix map_physmem check
  test/py: README: fix typo
  test/py: README: add HOSTNAME to PYTHONPATH
  test/py: do not import pytest multiple times
  test/py: add generic CRC32 function
  test/py: add spi_flash tests

 cmd/sf.c                    |   2 +-
 drivers/mtd/spi/spi_flash.c |   2 +-
 test/py/README.md           |   6 +-
 test/py/tests/test_sf.py    | 218 ++++++++++++++++++++++++++++++++++++++++++++
 test/py/u_boot_utils.py     |  24 ++++-
 5 files changed, 246 insertions(+), 6 deletions(-)
 create mode 100644 test/py/tests/test_sf.py


base-commit: f95ab1fb6e37f0601f397091bb011edf7a98b890
Published-As: https://github.com/Liambeguin/u-boot/releases/tag/test_sf-v4
-- 
2.16.1.72.g5be1f00a9a70

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-03-22 20:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-14 23:15 [U-Boot] [PATCH v4 0/7] add inital SF tests Liam Beguin
2018-03-14 23:15 ` [U-Boot] [PATCH v4 1/7] spi: spi_flash: do not fail silently on bad user input Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot, v4, " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 2/7] cmd: sf: fix map_physmem check Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,2/7] " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 3/7] test/py: README: fix typo Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,3/7] " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 4/7] test/py: README: add HOSTNAME to PYTHONPATH Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot, v4, " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 5/7] test/py: do not import pytest multiple times Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot, v4, " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 6/7] test/py: add generic CRC32 function Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,6/7] " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 7/7] test/py: add spi_flash tests Liam Beguin
2018-03-14 23:27   ` Stephen Warren
2018-03-14 23:30     ` Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,7/7] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox