[Skiboot] [PATCH v2 00/19] libflash/libffs/pflash improvements
Cyril Bur
cyril.bur at au1.ibm.com
Fri Jul 28 16:46:18 AEST 2017
Hello,
V2:
Addressed review from Sam:
Reworded commit message of 'Correct erase alignment checks'
Fixed typo in 'Update the code pathes for "--tune"'
Actually return failure from {enable,disable}_4b in
'Remove use of exit() and fix memory leaks'
I also went and added a description of the flags that currently just
get printed as single characters in --info. Patch 7
It turns out it is quite easy to overflow the progress bar, so I fixed
that in patch 15.
V1:
For a small amount of backstory, this started with writing tests and
fixing memory leaks for pflash, so, starting at patch 13/17 and then
everything got out of control.
The first few patches are fixes for various things which came up,
pflash tests did reveal some problems.
Starting at patch 8/17 is a rework of pflash to prepare it for
removing the memory leaks, a long overdue restructure which isn't
quite there but well on its way.
There are probably a few arguments to making this several series - I'm
open to such ideas.
I'll also note that there aren't as many pflash tests as would be
ideal but at least this is a start and adding more should be fairly
simple work.
Cyril Bur (19):
Makefile.check: Fix `make check`
libflash: Adding debugging output
libflash/file: Fix bad subtraction in file erase path
libflash/file: Break up MTD erase ioctl() calls
external/ffspart: Add .gitignore
libflash/libffs: Don't require 'part' size to be known by callers
external/pflash: Add description of flags
external/pflash: Check the result of strtoul
external/pflash: Stop using exit() in the main
external/pflash: Correct erase alignment checks
external/pflash: Remove global flash details
external/pflash: Update the code pathes for "--tune"
external/pflash: Move write and read size calculation together
external/pflash: Remove use of exit() and fix memory leaks
external/pflash: Make the progress bar safe for big numbers
external/pflash: Reinstate the progress bars
external: Consolidate Makefile.check for external tools
external/pflash: Add tests
external/pflash: tests: Move the test-miscprint to pflash tests
Makefile.main | 7 +-
external/Makefile.check | 31 +
external/common/arch_flash_powerpc.c | 11 +-
external/ffspart/.gitignore | 7 +
external/ffspart/ffspart.c | 10 +-
external/ffspart/test/Makefile.check | 20 -
external/ffspart/test/files/03-tiny-pnor.in | 8 +-
external/ffspart/test/files/03-tiny-pnor.out | Bin 2560 -> 2560 bytes
.../ffspart/test/files/03.1-tiny-pnor-backup.in | 8 +-
.../ffspart/test/files/03.1-tiny-pnor-backup.out | Bin 2864 -> 3840 bytes
external/ffspart/test/files/04-tiny-pnor2.out | Bin 2560 -> 2560 bytes
external/ffspart/test/results/05-hdr-overlap.err | 4 +-
external/ffspart/test/results/05-hdr-overlap.out | 1 -
.../test/results/05.1-hdr-overlap-backup.err | 4 +-
external/ffspart/test/tests/03.1-tiny-pnor-backup | 2 +-
external/gard/config.h | 19 +-
external/gard/test/Makefile.check | 26 -
external/pflash/.gitignore | 1 +
external/pflash/Makefile | 8 +
external/pflash/pflash.c | 642 +++++++++++++--------
external/pflash/progress.c | 35 +-
external/pflash/progress.h | 6 +-
external/pflash/test/files/01-info.ffs | 4 +
external/pflash/test/files/02-erase.ffs | 4 +
external/pflash/test/files/03-erase-parts.ffs | 4 +
external/pflash/test/files/04-program-rand.ffs | 4 +
external/pflash/test/files/05-bad-numbers.ffs | 4 +
external/pflash/test/files/06-miscprint.ffs | 4 +
external/pflash/test/make-check-test | 1 +
external/pflash/test/results/00-usage.err | 0
external/pflash/test/results/00-usage.out | 107 ++++
external/pflash/test/results/01-info.err | 0
external/pflash/test/results/01-info.out | 13 +
external/pflash/test/results/02-erase.err | 0
external/pflash/test/results/02-erase.out | 105 ++++
external/pflash/test/results/03-erase-parts.err | 0
external/pflash/test/results/03-erase-parts.out | 106 ++++
external/pflash/test/results/04-program-rand.err | 0
external/pflash/test/results/04-program-rand.out | 111 ++++
external/pflash/test/results/05-bad-numbers.err | 0
external/pflash/test/results/05-bad-numbers.out | 217 +++++++
external/pflash/test/results/06-miscprint.err | 0
external/pflash/test/results/06-miscprint.out | 36 ++
external/pflash/test/test-pflash | 59 ++
external/pflash/test/tests/00-usage | 12 +
external/pflash/test/tests/01-info | 22 +
external/pflash/test/tests/02-erase | 26 +
external/pflash/test/tests/03-erase-parts | 55 ++
external/pflash/test/tests/04-program-rand | 54 ++
external/pflash/test/tests/05-bad-numbers | 65 +++
external/pflash/test/tests/06-miscprint | 37 ++
external/test/test.sh | 11 +-
libflash/blocklevel.c | 64 +-
libflash/errors.h | 14 +
libflash/ffs.h | 1 +
libflash/file.c | 62 +-
libflash/libffs.c | 37 +-
libflash/libffs.h | 2 +-
libflash/libflash.h | 13 -
libflash/test/Makefile.check | 7 +-
libflash/test/test-blocklevel.c | 2 +
libflash/test/test-miscprint.pnor | Bin 3072 -> 0 bytes
libflash/test/test-miscprint.sh | 27 -
63 files changed, 1696 insertions(+), 444 deletions(-)
create mode 100644 external/Makefile.check
create mode 100644 external/ffspart/.gitignore
delete mode 100644 external/ffspart/test/Makefile.check
delete mode 100644 external/gard/test/Makefile.check
create mode 100644 external/pflash/test/files/01-info.ffs
create mode 100644 external/pflash/test/files/02-erase.ffs
create mode 100644 external/pflash/test/files/03-erase-parts.ffs
create mode 100644 external/pflash/test/files/04-program-rand.ffs
create mode 100644 external/pflash/test/files/05-bad-numbers.ffs
create mode 100644 external/pflash/test/files/06-miscprint.ffs
create mode 100755 external/pflash/test/make-check-test
create mode 100644 external/pflash/test/results/00-usage.err
create mode 100644 external/pflash/test/results/00-usage.out
create mode 100644 external/pflash/test/results/01-info.err
create mode 100644 external/pflash/test/results/01-info.out
create mode 100644 external/pflash/test/results/02-erase.err
create mode 100644 external/pflash/test/results/02-erase.out
create mode 100644 external/pflash/test/results/03-erase-parts.err
create mode 100644 external/pflash/test/results/03-erase-parts.out
create mode 100644 external/pflash/test/results/04-program-rand.err
create mode 100644 external/pflash/test/results/04-program-rand.out
create mode 100644 external/pflash/test/results/05-bad-numbers.err
create mode 100644 external/pflash/test/results/05-bad-numbers.out
create mode 100644 external/pflash/test/results/06-miscprint.err
create mode 100644 external/pflash/test/results/06-miscprint.out
create mode 100755 external/pflash/test/test-pflash
create mode 100644 external/pflash/test/tests/00-usage
create mode 100644 external/pflash/test/tests/01-info
create mode 100644 external/pflash/test/tests/02-erase
create mode 100644 external/pflash/test/tests/03-erase-parts
create mode 100644 external/pflash/test/tests/04-program-rand
create mode 100644 external/pflash/test/tests/05-bad-numbers
create mode 100644 external/pflash/test/tests/06-miscprint
delete mode 100644 libflash/test/test-miscprint.pnor
delete mode 100755 libflash/test/test-miscprint.sh
--
2.13.3
More information about the Skiboot
mailing list