Commit Graph

2 Commits

Author SHA1 Message Date
Wyatt Hepler
118fc3c5f0 pw_kvs: Expand tests for error handling
- 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
2020-02-24 10:08:27 -08:00
Wyatt Hepler
cdd6dfcfc6 pw_kvs: FlashMemory updates; test utilities
- 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
2020-02-19 19:10:32 +00:00