summaryrefslogtreecommitdiffstats
path: root/test/vpnor/dump_flash.cpp
Commit message (Collapse)AuthorAgeFilesLines
* test: Move vpnor tests to vpnor directoryAndrew Jeffery2018-04-041-92/+0
| | | | | | | | | In the spirit of things that are together should be kept together. The repository layout now better corresponds to upstream with the exception of the vpnor directory and some modifications to Makefile.am Change-Id: I16d59a3c9ee846065f6a8c83eb4459715d525f3f Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* vpnor: Isolate relevant code in vpnor directoryAndrew Jeffery2018-04-041-1/+1
| | | | | | | | | | | | This is prepatory work for introducing more vpnor-specific behaviours to window handling. We will be introducing more objects to link, in order to hook some of the window command handlers. This change takes the opportunity to revert back to the upstream names for some of the original C files. Change-Id: I6b67ae466a2695054035e65ba752881be9c32d1a Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: vpnor: Add dump_flash testAndrew Jeffery2018-04-041-0/+92
The test is intended to read and verify the content of the flash, and verify that the read completes without error in the face of unusual flash size with respect to the window configuration. Specifically, the test is arranged such that the reserved memory exceeds the flash size, and the flash layout conspires such that the final request is for a window whose flash offset and window size exceed the flash size. This currently triggers an error condition in the mbox window handling, and causes the host to receive an error response to its CREATE_READ_WINDOW request. On the host side this results in the reading process receiving an EIO. Due to what is probably an oversight in the mbox window handling, some care needs to be taken in the test configuration: The current behaviour is that copy_flash() will return a length that may be less than the size of the reserved memory window. The returned value is aligned up to the next block and assigned as the current window's size. However, when evicting a window, we do not reset the size to the default size. As a consequence, windows can shrink and remain at a size below the default window size. Without careful control of the test parameters this can lead to the appearance that there is no bug in the window handling as, serendipitously, a window of the correct size can be evicted for the final CREATE_READ_WINDOW request. Change-Id: I436595f428bf4e93392315ec1110b6b6f4a11821 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
OpenPOWER on IntegriCloud