[Skiboot] [PATCH 00/51] ipmi-hiomap: Tests and fixes for event handling

Andrew Jeffery andrew at aj.id.au
Fri Feb 15 17:56:17 AEDT 2019


Hello!

This series drastically improves the test coverage for HIOMAP over IPMI, and
fixes various bugs along the way. Once the series is said and done we have
90.9% line coverage and 100% function coverage of libflash/ipmi-hiomap.c

The bugs fixed along the way include issues with bits of infrastructure that
crop up when invoking `make coverage-report` as well as bugs in error state
handling in the IPMI HIOMAP implementation itself. The series was inspired by a
bug report by Vasant; patch 09/51 should fix that particular issue.

I've done each test case as a patch as they're pretty verbose, and reviewing
thousands of lines in one patch isn't my idea of fun, so I assume it's not
Stewart's either.

The series has been lightly tested on a Witherspoon system, with various
restarts of mboxd, ipmid, the BMC itself and the host thrown in. No issues were
encountered.

So, please review! Several beers to anyone who can Reviewed-by: the entire
series.

Andrew

Andrew Jeffery (51):
  stubs: Remove __attrconst annotation
  ffspart, libflash: Fix stack size warnings
  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: Improve BMC error state behaviour
  libflash/ipmi-hiomap: Overhaul error handling
  libflash/ipmi-hiomap: Remove unused close handling
  libflash/ipmi-hiomap: Enforce message size for empty response
  libflash/ipmi-hiomap: Don't remove acked events unless we recover
  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 protocol-recovery-failure-restore-write test
  test-ipmi-hiomap: Add protocol-recovery-failure-restore-read test
  test-ipmi-hiomap: Add window-recovery-failure-restore-read test
  test-ipmi-hiomap: Add window-recovery-failure-restore-write test

 Makefile.main                    |    8 +
 core/test/stubs.c                |    4 +-
 external/ffspart/ffspart.c       |    4 +-
 external/gard/Makefile           |    4 +
 external/gard/gard.c             |    5 +-
 external/pflash/Makefile         |    4 +
 hdata/test/stubs.c               |    4 +-
 libflash/file.c                  |    2 +-
 libflash/ipmi-hiomap.c           |  337 ++--
 libflash/ipmi-hiomap.h           |    1 -
 libflash/test/test-ipmi-hiomap.c | 3015 +++++++++++++++++++++++++++++-
 11 files changed, 3249 insertions(+), 139 deletions(-)

-- 
2.19.1



More information about the Skiboot mailing list