mbox series

[v2,00/52] ipmi-hiomap: Tests and fixes for event handling

Message ID 20190221062851.21958-1-andrew@aj.id.au
Headers show
Series ipmi-hiomap: Tests and fixes for event handling | expand

Message

Andrew Jeffery Feb. 21, 2019, 6:27 a.m. UTC
Hello,

Round two of this overly-large series. Hopefully I've cleaned it up enough this
time around.

v1 can be found at:

  https://lists.ozlabs.org/pipermail/skiboot/2019-February/013226.html

Changes in v2:

* Drop the __attrconst patch that broke everything in snowpatch - it was a
  nice-to-have cleanup that turns out not to work everywhere.

* Cc: stable for all^Wmost of the things. I excluded patches 2-5 as they're
  build infrastructure-ish, but feel free to backport them too.

* Fix the race condition that I noted in patch 13/51 from v1. This actually
  turned into almost completely reworking ipmi_hiomap_handle_events(), but at
  least we have test cases covering that (now). The rework lead to actually
  *removing* code and generally making things simpler, and then also removing
  the tests associated with the removed code, and finally ending up with
  something that's (hopefully) more correct. I feel like that's a pretty good
  outcome.

* New patches in v2 include fixing header file change detection for make
  targets in libflash/test and the introduction of several new tests,

I've tested the series via:

1. Travis-CI: https://travis-ci.org/amboar/skiboot/builds/496338439
2. Done my own `git rebase -i --exec "make coverage" ...` over the series
3. run `make check` on the tip of the series to find any leaks, and
4. Done some manual verification of functionality and event handling on a
   Witherspoon (booting, and variously starting and stopping the BMC-side
   daemon while interacting with /dev/mtd0).

On the code coverage front, like v1 the series achieves 100% function coverage
of libflash/ipmi-hiomap.c and slightly greater than 90% line coverage.
  
Please review, if you can bear the tedium.

Andrew

Andrew Jeffery (52):
  libflash/test: Generate header dependencies for tests
  ffspart, libflash: Fix stack size warnings
  pflash: Increase stack frame size warning threshold
  gard: Fix warnings from gcc 8.2.0
  Makefile: Paper over gard and pflash coverage issues
  test-ipmi-hiomap: Add ability to delay some IPMI messages
  test-ipmi-hiomap: Dump unexpected IPMI messages
  test-ipmi-hiomap: Ensure the completion code is set
  test-ipmi-hiomap: Print some information on early scenario_exit()
  libflash/ipmi-hiomap: Fix leak of msg in callback
  libflash/ipmi-hiomap: Overhaul error handling
  libflash/ipmi-hiomap: Overhaul event handling
  libflash/ipmi-hiomap: Remove unused close handling
  libflash/ipmi-hiomap: Enforce message size for empty response
  test-ipmi-hiomap: Add protocol-persistent-error test
  test-ipmi-hiomap: Add read-one-block test
  test-ipmi-hiomap: Add read-two-blocks test
  test-ipmi-hiomap: Add event-before-read
  test-ipmi-hiomap: Add event-during-read test
  test-ipmi-hiomap: Add write-one-block test
  test-ipmi-hiomap: Add write-two-blocks test
  test-ipmi-hiomap: Add event-before-write test
  test-ipmi-hiomap: Add event-during-write test
  test-ipmi-hiomap: Add erase-one-block test
  test-ipmi-hiomap: Add erase-two-blocks test
  test-ipmi-hiomap: Add event-before-erase test
  test-ipmi-hiomap: Add event-during-erase
  test-ipmi-hiomap: Add bad-sequence test
  test-ipmi-hiomap: Add action-error test
  test-ipmi-hiomap: Add get-flash-info test
  test-ipmi-hiomap: Add get-info-error test
  test-ipmi-hiomap: Add get-flash-info-error test
  test-ipmi-hiomap: Add create-read-window-error test
  test-ipmi-hiomap: Add create-write-window-error test
  test-ipmi-hiomap: Add mark-dirty-error test
  test-ipmi-hiomap: Add flush-error test
  test-ipmi-hiomap: Add ack-error test
  test-ipmi-hiomap: Add erase-error test
  test-ipmi-hiomap: Add ack-malformed tests
  test-ipmi-hiomap: Add get-info-malformed tests
  test-ipmi-hiomap: Add get-flash-info-malformed tests
  test-ipmi-hiomap: Add create-read-window-malformed tests
  test-ipmi-hiomap: Add create-write-window-malformed tests
  test-ipmi-hiomap: Add mark-dirty-malformed tests
  test-ipmi-hiomap: Add flush-malformed tests
  test-ipmi-hiomap: Add erase-malformed tests
  test-ipmi-hiomap: Add protocol-recovery-failure-ack test
  test-ipmi-hiomap: Add protocol-recovery-failure-get-info test
  test-ipmi-hiomap: Add protocol-recovery-get-flash-info-failure test
  test-ipmi-hiomap: Add read-one-block-twice test
  test-ipmi-hiomap: Add write-one-block-twice test
  test-ipmi-hiomap: Add erase-one-block-twice test

 Makefile.main                    |    8 +
 external/ffspart/ffspart.c       |    4 +-
 external/gard/Makefile           |    4 +
 external/gard/gard.c             |    5 +-
 external/pflash/Makefile         |    4 +
 external/pflash/rules.mk         |    1 +
 libflash/file.c                  |    2 +-
 libflash/ipmi-hiomap.c           |  425 +++--
 libflash/ipmi-hiomap.h           |    1 -
 libflash/test/Makefile.check     |    5 +-
 libflash/test/test-ipmi-hiomap.c | 2508 +++++++++++++++++++++++++++++-
 11 files changed, 2787 insertions(+), 180 deletions(-)

Comments

Stewart Smith Feb. 25, 2019, 12:26 a.m. UTC | #1
Andrew Jeffery <andrew@aj.id.au> writes:
> Round two of this overly-large series. Hopefully I've cleaned it up enough this
> time around.

I think so.

Series merged to master as of a3777e58990f.