diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-02-28 23:16:48 +1030 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2018-03-24 13:59:32 +1030 |
commit | ae1edb940c65e13e610108203e6a1cba0ab424c7 (patch) | |
tree | 404e3aeffeca9a94635599cd3d1d1b09d56b10d3 /test | |
parent | cd928513e21f02ebca1f68a414f5347a7de8326d (diff) | |
download | phosphor-mboxd-ae1edb940c65e13e610108203e6a1cba0ab424c7.tar.gz phosphor-mboxd-ae1edb940c65e13e610108203e6a1cba0ab424c7.zip |
pnor_partition_table: Raise exception for unmapped offsets
Allow reads and writes of offsets that don't map onto partitions defined
in the ToC. Do so by ignoring the mapping failure and filling a window
with 0xff in the hole from the requested offset to the following
partition.
This change also removes the reliance on InternalFailure as the
exception of choice for communicating failures. We can do better without
the teeth-pulling required by phosphor-logging by translating custom
exceptions into phosphor-logging exceptions at the edges.
Change-Id: Ibfa961a66b0b979354c6dc226ccbe7e9fbafc16d
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'test')
-rw-r--r-- | test/vpnor/Makefile.am.include | 2 | ||||
-rw-r--r-- | test/vpnor/toc_lookup_failed.cpp | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/test/vpnor/Makefile.am.include b/test/vpnor/Makefile.am.include index e8d51ca..2db5b8e 100644 --- a/test/vpnor/Makefile.am.include +++ b/test/vpnor/Makefile.am.include @@ -227,6 +227,4 @@ check_PROGRAMS += \ %reldir%/create_read_window_oob \ %reldir%/create_read_window_toc \ %reldir%/create_read_window_straddle_partitions - -XFAIL_TESTS += %reldir%/create_read_window_oob endif diff --git a/test/vpnor/toc_lookup_failed.cpp b/test/vpnor/toc_lookup_failed.cpp index c38bcbd..a35975a 100644 --- a/test/vpnor/toc_lookup_failed.cpp +++ b/test/vpnor/toc_lookup_failed.cpp @@ -45,7 +45,7 @@ int main() { table.partition("TWO"); } - catch (err::InternalFailure& e) + catch (vpnor::UnknownPartition& e) { return 0; } |