Commit Graph

5 Commits

Author SHA1 Message Date
Wyatt Hepler
6c24c0638b pw_kvs: Implement Delete; add tests
- Implement Delete function.
- Add new tests and enable a few that pass now.
- Have out-of-bounds flash reads return OUT_OF_RANGE to differentiate
  from INVALID_ARGUMENT.

Change-Id: I5d65ad36913b30f2554bd12eaba26127ae0ec8f2
2020-02-05 18:00:56 -08:00
Wyatt Hepler
1c83000fd9 pw_kvs: Verify magic and checksum in flash
Change-Id: I9424379de2da47d294766e481e3d789a166766c3
2020-02-05 17:48:18 +00:00
Wyatt Hepler
93b889d7cb pw_kvs: Move EntrySize to the EntryHeader class
Change-Id: I4b2dd6d6e9e632df9d39bcfad1c2a6ac321ab317
2020-02-05 09:08:58 -08:00
Wyatt Hepler
0a22358554 pw_kvs: Verify checksum on write
- Replace placeholder VerifyEntry function with the real verification
  function, VerifyChecksumInFlash.
- Have VerifyChecksumInFlash read everything from flash, not just the
  value.
- Fix missing bytes_to_read updates.

Change-Id: If856c60dee710bea128684fd1bb22d3e7fc62793
2020-02-05 06:35:08 +00:00
Wyatt Hepler
6e3a83b61f pw_kvs: Get checksums working; enable test
- Allow checksums to verify data larger than their internal state. This
  facilitates using a CRC16 in a uint32_t.
- Move checksum functions to the EntryHeader class, since it ultimately
  stores the checksums and is included with it.
- Enable one checksum test. Further tests are needed.
- Make some tweaks to the Get overload for objects.

Change-Id: I989b72905e140794f75c8f8619aaab1623f6f195
2020-02-04 16:35:40 -08:00