- Update AlignedWriter to prevent writing after an error occurs.
- Ensure that the number of written bytes is always returned for
AlignedWriter errors.
- Remove FlashError::Mode, since the number of bytes affected should
always be set.
- Add tests to alignment_test.cc and key_value_store.cc to cover
failures during AlignedWrite.
- Update some comments.
Change-Id: Id62f1564b3641be0aeb7f799f0fa0538a1b5b09e
- Provide StatusWithSize constants that can be used similarly to
Status::Codes. For example, StatusWithSize::DATA_LOSS constructs a
StatusWithSize with status DATA_LOSS and size 0.
- Remove the default constructor argument for the size. Use the
constants instead.
- Update uses of StatusWithSize(Status::X) to use StatusWithSize::X.
Change-Id: I901b7bb0bbbb4fde52f6b3acc3047f366b250515
- Add error injection features to InMemoryFakeFlash. Reads or Writes can
be programmed to fail.
- Introduce key_value_store_error_handling_test.cc, which focuses on
corruption and read/write failure cases.
- Add functions for creating binary KVS entries at compile time.
Change-Id: Ie52ba5eb13eb60244835ef43314282beacc3a659
- Update comments for FlashMemory class.
- Split InMemoryFakeFlash to move the fixed-size buffer into the
derived FakeFlashBuffer class.
- Support initializing FakeFlashBuffer to data provided at construction.
- Allow direct access to the underlying fake flash buffer for testing.
- Create utilities for working with byte arrays in byte_utils.h.
Change-Id: I90d33621cb91da079d7213fe7d33823494120e48