/external/pigweed/pw_kvs/ |
D | key_value_store_binary_format_test.cc | 177 kvs_(&partition_, default_format, kNoGcOptions) {} in KvsErrorHandling() 186 KeyValueStoreBuffer<kMaxEntries, kMaxUsableSectors> kvs_; member in pw::kvs::__anon371466c50111::KvsErrorHandling 192 EXPECT_EQ(OkStatus(), kvs_.Init()); in TEST_F() 194 EXPECT_EQ(OkStatus(), kvs_.Get("key1", buffer).status()); in TEST_F() 195 EXPECT_EQ(OkStatus(), kvs_.Get("k2", buffer).status()); in TEST_F() 201 EXPECT_EQ(Status::DataLoss(), kvs_.Init()); in TEST_F() 203 EXPECT_EQ(OkStatus(), kvs_.Get("key1", buffer).status()); in TEST_F() 204 EXPECT_EQ(Status::NotFound(), kvs_.Get("k2", buffer).status()); in TEST_F() 213 ASSERT_EQ(Status::DataLoss(), kvs_.Init()); in TEST_F() 215 ASSERT_EQ(Status::NotFound(), kvs_.Get("key1", buffer).status()); in TEST_F() [all …]
|
D | key_value_store_initialized_test.cc | 84 EmptyInitializedKvs() : kvs_(&test_partition, default_format) { in EmptyInitializedKvs() 86 ASSERT_EQ(OkStatus(), kvs_.Init()); in EmptyInitializedKvs() 111 kvs_.Put(key, in FillKvs() 118 ASSERT_EQ(OkStatus(), kvs_.Delete(key)); in FillKvs() 121 KeyValueStoreBuffer<kMaxEntries, kMaxUsableSectors> kvs_; member in pw::kvs::__anonf963488e0111::EmptyInitializedKvs 131 kvs_.Put("The Key!", std::as_bytes(std::span(value)))); in TEST_F() 140 kvs_.Put("The Key!", std::as_bytes(std::span(value)))); in TEST_F() 149 ASSERT_EQ(OkStatus(), kvs_.Put("The Key!", i)); in TEST_F() 156 ASSERT_EQ(OkStatus(), kvs_.Put("key", input)); in TEST_F() 159 ASSERT_EQ(OkStatus(), kvs_.Get("key", &output)); in TEST_F() [all …]
|
D | key_value_store_wear_test.cc | 37 kvs_(&partition_, format) { in WearTest() 38 EXPECT_EQ(OkStatus(), kvs_.Init()); in WearTest() 48 KeyValueStoreBuffer<kMaxEntries, kSectors> kvs_; member in pw::kvs::__anon9dbb52e70111::WearTest 68 EXPECT_TRUE(kvs_.Put("large_entry", std::span(test_data)).ok()); in TEST_F() 76 partition_.SaveStorageStats(kvs_, "WearTest RepeatedLargeEntry"); in TEST_F() 96 kvs_.Put("key", in TEST_F() 108 EXPECT_EQ(OkStatus(), kvs_.Put("big_key", test_data)); in TEST_F() 111 EXPECT_EQ(2u, kvs_.size()); in TEST_F()
|
D | key_value_store_test.cc | 360 LargeEmptyInitializedKvs() : kvs_(&large_test_partition, default_format) { in LargeEmptyInitializedKvs() 362 ASSERT_EQ(OkStatus(), kvs_.Init()); in LargeEmptyInitializedKvs() 365 KeyValueStoreBuffer<kMaxEntries, kMaxUsableSectors> kvs_; member in pw::kvs::LargeEmptyInitializedKvs 372 ASSERT_EQ(OkStatus(), kvs_.Put(keys[0], kValue1)); in TEST_F() 373 EXPECT_EQ(kvs_.size(), 1u); in TEST_F() 374 ASSERT_EQ(OkStatus(), kvs_.Delete(keys[0])); in TEST_F() 375 EXPECT_EQ(kvs_.Get(keys[0], &value), Status::NotFound()); in TEST_F() 376 ASSERT_EQ(OkStatus(), kvs_.Put(keys[1], kValue1)); in TEST_F() 377 ASSERT_EQ(OkStatus(), kvs_.Put(keys[2], kValue2)); in TEST_F() 378 ASSERT_EQ(OkStatus(), kvs_.Delete(keys[1])); in TEST_F() [all …]
|
D | key_value_store_map_test.cc | 90 kvs_(&partition_, {.magic = 0xc857e51d, .checksum = nullptr}) { in KvsTester() 92 Status result = kvs_.Init(); 167 label << ((kvs_.redundancy() > 1) ? "Redundant" : ""); in Test_RandomValidInputs() 169 partition_.SaveStorageStats(kvs_, label.data()); in Test_RandomValidInputs() 210 std::cout << "Entries: " << kvs_.size() << '\n'; in CompareContents() 212 for (const auto& item : kvs_) { in CompareContents() 236 EXPECT_EQ(map_.size(), kvs_.size()); in CompareContents() 240 for (auto& item : kvs_) { in CompareContents() 267 Status result = kvs_.Put(key, std::as_bytes(std::span(value))); in Put() 271 } else if (map_.size() == kvs_.max_size()) { in Put() [all …]
|
D | key_value_store_fuzz_test.cc | 47 : kvs_(&test_partition, {.magic = 0x873a9b50, .checksum = &checksum}) { in EmptyInitializedKvs() 49 ASSERT_EQ(OkStatus(), kvs_.Init()); 52 KeyValueStoreBuffer<kMaxEntries, kMaxUsableSectors> kvs_; member in pw::kvs::__anonbc4927c70111::EmptyInitializedKvs 67 kvs_.Put(std::string_view(value, key_size), in TEST_F() 73 test_partition.SaveStorageStats(kvs_, "fuzz Put_VaryingKeysAndValues"); in TEST_F()
|
D | key_value_store.cc | 464 if (kvs_.ReadEntry(*iterator_, entry).ok()) { in ReadKey() 471 while (++item_.iterator_ != item_.kvs_.entry_cache_.end() && in operator ++()
|
/external/pigweed/pw_kvs/public/pw_kvs/ |
D | key_value_store.h | 228 return kvs_.Get(key(), *iterator_, value_buffer, offset_bytes); 236 return kvs_.FixedSizeGet(key(), *iterator_, pointer, sizeof(T)); in Get() 241 StatusWithSize ValueSize() const { return kvs_.ValueSize(*iterator_); } in ValueSize() 248 : kvs_(kvs), iterator_(item_iterator), key_buffer_{} {} in Item() 252 const KeyValueStore& kvs_; variable
|
/external/pigweed/pw_blob_store/ |
D | blob_store.cc | 67 if (!kvs_.Get(MetadataKey(), &metadata_).ok()) { in LoadMetadata() 169 if (!kvs_.Put(MetadataKey(), metadata_).ok()) { in CloseWrite() 470 Status status = kvs_.Delete(MetadataKey()); in Invalidate()
|
/external/pigweed/pw_blob_store/public/pw_blob_store/ |
D | blob_store.h | 287 kvs_(kvs), in BlobStore() 475 kvs::KeyValueStore& kvs_; variable
|