aboutsummaryrefslogtreecommitdiff
path: root/libflash/test
AgeCommit message (Collapse)AuthorFilesLines
2019-04-09test-ipmi-hiomap: Add read-one-byte testVasant Hegde1-0/+40
Add test case to read: - 1 byte - 1 block and 1 byte data Cc: Andrew Jeffery <andrew@aj.id.au> Cc: skiboot-stable@lists.ozlabs.org Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-04-09test-ipmi-hiomap: Fix lpc-read-successVasant Hegde1-1/+3
Cc: Andrew Jeffery <andrew@aj.id.au> Cc: skiboot-stable@lists.ozlabs.org Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-04-09test-ipmi-hiomap: Add write-one-byte testVasant Hegde1-0/+38
Add test case to write: - 1 byte - 1 block and 1 byte data Cc: Andrew Jeffery <andrew@aj.id.au> Cc: skiboot-stable@lists.ozlabs.org Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-04-09test-ipmi-hiomap: Assert if size is zeroVasant Hegde1-1/+2
Cc: Andrew Jeffery <andrew@aj.id.au> Cc: skiboot-stable@lists.ozlabs.org Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add erase-one-block-twice testAndrew Jeffery1-0/+61
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add write-one-block-twice testAndrew Jeffery1-0/+65
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add read-one-block-twice testAndrew Jeffery1-0/+33
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add protocol-recovery-get-flash-info-failure testAndrew Jeffery1-0/+195
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add protocol-recovery-failure-get-info testAndrew Jeffery1-0/+191
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add protocol-recovery-failure-ack testAndrew Jeffery1-0/+170
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add erase-malformed testsAndrew Jeffery1-0/+92
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add flush-malformed testsAndrew Jeffery1-0/+95
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add mark-dirty-malformed testsAndrew Jeffery1-0/+101
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add create-write-window-malformed testsAndrew Jeffery1-0/+95
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add create-read-window-malformed testsAndrew Jeffery1-0/+95
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add get-flash-info-malformed testsAndrew Jeffery1-0/+64
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add get-info-malformed testsAndrew Jeffery1-0/+64
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add ack-malformed testsAndrew Jeffery1-0/+60
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add erase-error testAndrew Jeffery1-0/+41
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add ack-error testAndrew Jeffery1-0/+7
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add flush-error testAndrew Jeffery1-0/+42
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add mark-dirty-error testAndrew Jeffery1-0/+45
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add create-write-window-error testAndrew Jeffery1-0/+42
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add create-read-window-error testAndrew Jeffery1-0/+42
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add get-flash-info-error testAndrew Jeffery1-0/+30
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add get-info-error testAndrew Jeffery1-0/+29
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add get-flash-info testAndrew Jeffery1-0/+46
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add action-error testAndrew Jeffery1-0/+30
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add bad-sequence testAndrew Jeffery1-0/+31
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add event-during-eraseAndrew Jeffery1-0/+37
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add event-before-erase testAndrew Jeffery1-0/+18
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add erase-two-blocks testAndrew Jeffery1-0/+64
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add erase-one-block testAndrew Jeffery1-0/+54
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add event-during-write testAndrew Jeffery1-0/+41
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add event-before-write testAndrew Jeffery1-0/+15
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add write-two-blocks testAndrew Jeffery1-0/+118
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add write-one-block testAndrew Jeffery1-0/+92
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add event-during-read testAndrew Jeffery1-0/+41
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add event-before-readAndrew Jeffery1-0/+30
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add read-two-blocks testAndrew Jeffery1-7/+98
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add read-one-block testAndrew Jeffery1-3/+68
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-24test-ipmi-hiomap: Add protocol-persistent-error testAndrew Jeffery1-0/+33
Cc: stable Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Tested-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-21test-ipmi-hiomap: Print some information on early scenario_exit()Andrew Jeffery1-1/+6
Now we dump the index of the event that we exited on if it's not the appropriate scenario event type. Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-21test-ipmi-hiomap: Ensure the completion code is setAndrew Jeffery1-0/+2
ipmi_queue_msg_sync() intercepts and implements the IPMI transfers for the test scenarios. In some scenarios we want to return IPMI error codes, so make sure the msg->cc field is set. Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-21test-ipmi-hiomap: Dump unexpected IPMI messagesAndrew Jeffery1-0/+3
These indicate an implementation bug or broken scenario. Either way it's helpful to know what arrived given it wasn't expected. Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-21test-ipmi-hiomap: Add ability to delay some IPMI messagesAndrew Jeffery1-1/+24
The initial implementation delivered all BMC-initiated SELs immediately after the delivery of the last response to the host. In some circumstances we want slightly more control over how this works, so introduce a means to manually advance the scenario in the test case. Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2019-02-21libflash/test: Generate header dependencies for testsAndrew Jeffery1-1/+4
Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-21libflash: Don't merge ECC-protected rangesSamuel Mendoza-Jonas1-18/+0
Libflash currently merges contiguous ECC-protected ranges, but doesn't check that the ECC bytes at the end of the first and start of the second range actually match sanely. More importantly, if blocklevel_read() is called with a position at the start of a partition that is contained somewhere within a region that has been merged it will update the position assuming ECC wasn't being accounted for. This results in the position being somewhere well after the actual start of the partition which is incorrect. For now, remove the code merging ranges. This means more ranges must be held and checked however it prevents incorrectly reading ECC-correct regions like below: [ 174.334119453,7] FLASH: CAPP partition has ECC [ 174.437349574,3] ECC: uncorrectable error: ffffffffffffffff ff [ 174.437426306,3] FLASH: failed to read the first 0x1000 from CAPP partition, rc 14 [ 174.439919343,3] CAPP: Error loading ucode lid. index=201d1 Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-21libflash: Restore blocklevel testsSamuel Mendoza-Jonas1-0/+5
This fell out in f58be46 "libflash/test: Rewrite Makefile.check to improve scalability". Add it back in as test-blocklevel. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-11-08libflash/ipmi-hiomap: Respect daemon presence and flash controlAndrew Jeffery1-0/+325
Fix the fix of ORing in the BMC state - we only want to retain state covered by the ack mask as this is something we still need to handle. Critically, we must not retain state not covered by the ack mask as this may lead to host firmware attempting to communicate with a dead daemon or attempting to access the PNOR whilst the daemon is not in control of the flash. Further, add unit tests to capture the desired (and now implemented) behaviour. Fixes: 34cffed2ccf3 ("libflash/ipmi-hiomap: Improve event handling") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>