- Reorder entry_test.cc and add an additional test for Copy.
- Add comments to key_value_store_map_test.cc.
Change-Id: Icd02db02e6a8be63b7a09688c997c3dd72c45ad9
Fix garbage collection when using redudant entries.
- Improve "find sector to write entry to" and "find sector to GC"
algorithms so they work better with redundant entries.
- Add support in GC to be aware of partially written keys, where the
first entry is written to flash, but GC is needed to free space for
the redundant entries to have space to be written.
Tested with kEntryRedundancy up to 2.
Change-Id: Iff88d970714fa1ece634af926a1838a5f7d5d7e7
Add support to KVS for storing multiple identical copies of key-value
entries.
Currently only tested for kEntryRedundancy = 1.
Change-Id: Ibb8e5667f1f8406070a8d8854c1145daa76c5aea
- Add public methods to do full garbage collect and partial garbage
collect.
- Do clean up related to finding sector to write entry to that is in
preparation for adding redundancy support.
Change-Id: Ib7e43aa8955a292b025cdff712e4af1745229a69
- Add public methods to do full garbage collect and partial garbage
collect.
- Do clean up related to finding sector to write entry to that is in
preparation for adding redundancy support.
Change-Id: I42686e60ff53a7372303cf61895a4a937dc2bfb9
- Move EntryHeaderFormat and the EntryHeader struct to pw_kvs/format.h.
- Rename EntryHeaderFormat to EntryFormat.
Change-Id: Ic5e53c688cd3a483101c7985def6e4bef9c3cbaf
- Test calling Init() at random points.
- Test using only two sectors and using many smaller sectors.
- Delete tests that will never work, since alignments must be a multiple
of 16.
Change-Id: Ia2c580ddf81367587f140ededc5ee1b15833e4b7
- Switch from per-key versions to a monotonically increasing KVS-global
transcation ID.
- Move KeyDescriptor and the hash function to their own files.
Change-Id: I05287137579d4fe2d72c6e176969d46006c2aae6
Move the KeyDescriptor and SectorDescriptor lists to a templated derived
KeyValueStoreBuffer class. This allows multiple KVSs supporting
different numbers of keys and sectors to exist side-by-side.
Change-Id: I43d0647382e763008ae3b08580c736c1978793dd
- 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
- Add the FlashPartition and address to the Entry class.
- Move functions for reading or writing the entry header, key, and value
to the Entry class.
Change-Id: I0af3c140a519c8b050fcef81eca4f3b45560f75c
When moving tombstone entries for deleted keys, RelocateEntry would
cause them to become present again.
Expand key_value_store_map_test.cc and add a test that covers this case
specifically.
Change-Id: I846cb155bffb25198377e04752cace971555d32b
Introduce a system for writing tests against flash memories with
different parameters. The tests use a std::unordered_map as an oracle,
and all operations are checked against it. Invalid inputs and the KVS
filling up are handled.
Disable most of the tests because they are currently failing.
Change-Id: Ib817e30a199c81b3146823252be91e0db016c9b3