Lines Matching full:pel
31 * And because we have PEL object, also clean up
73 auto pel = std::make_unique<PEL>(data); in TEST_F() local
75 repo.add(pel); in TEST_F()
77 // Check that the PEL was stored where it was supposed to be, in TEST_F()
78 // and that it wrote the PEL data. in TEST_F()
79 const auto ts = pel->privateHeader().commitTimestamp(); in TEST_F()
80 auto name = Repository::getPELFilename(pel->id(), ts); in TEST_F()
86 auto pelData = pel->data(); in TEST_F()
89 EXPECT_EQ(repo.lastPelID(), pel->id()); in TEST_F()
94 using pelID = Repository::LogID::Pel; in TEST_F()
97 // Add and remove a PEL from the repo in TEST_F()
102 auto pel = std::make_unique<PEL>(data, 1); in TEST_F() local
104 pel->assignID(); in TEST_F()
105 Repository::LogID id{pelID{pel->id()}, obmcID{pel->obmcLogID()}}; in TEST_F()
107 repo.add(pel); in TEST_F()
121 using pelID = Repository::LogID::Pel; in TEST_F()
132 auto pel = std::make_unique<PEL>(data, 1); in TEST_F() local
133 pel->assignID(); in TEST_F()
134 repo.add(pel); in TEST_F()
135 ids.emplace_back(pelID(pel->id()), obmcID(1)); in TEST_F()
139 auto pel = std::make_unique<PEL>(data, 2); in TEST_F() local
140 pel->assignID(); in TEST_F()
141 repo.add(pel); in TEST_F()
142 ids.emplace_back(pelID(pel->id()), obmcID(2)); in TEST_F()
151 // Search based on PEL ID in TEST_F()
160 // ... based on the other PEL ID in TEST_F()
194 ID badID{ID::Pel(42)}; in TEST_F()
198 // Add a PEL to the repo, and get the data back with getPELData. in TEST_F()
201 auto pel = std::make_unique<PEL>(data); in TEST_F() local
202 auto pelID = pel->id(); in TEST_F()
203 repo.add(pel); in TEST_F()
205 ID id{ID::Pel(pelID)}; in TEST_F()
218 auto pel = std::make_unique<PEL>(data); in TEST_F() local
219 repo.add(pel); in TEST_F()
221 pel = std::make_unique<PEL>(data); in TEST_F()
222 pel->assignID(); in TEST_F()
223 pel->setCommitTime(); in TEST_F()
224 repo.add(pel); in TEST_F()
228 Repository::ForEachFunc f1 = [&ids](const PEL& pel) { in TEST_F() argument
229 ids.push_back(pel.id()); in TEST_F()
238 Repository::ForEachFunc f2 = [&ids](const PEL& pel) { in TEST_F() argument
239 ids.push_back(pel.id()); in TEST_F()
253 Repository::AddCallback ac = [&added](const PEL& pel) { in TEST_F() argument
254 added.push_back(pel.id()); in TEST_F()
266 auto pel = std::make_unique<PEL>(data); in TEST_F() local
267 auto pelID = pel->id(); in TEST_F()
268 repo.add(pel); in TEST_F()
273 ID id{ID::Pel(pelID)}; in TEST_F()
284 repo.add(pel); in TEST_F()
299 // Add a PEL to the repo in TEST_F()
301 auto pel = std::make_unique<PEL>(data); in TEST_F() local
302 repo.add(pel); in TEST_F()
304 pelID = pel->id(); in TEST_F()
305 actionFlags = pel->userHeader().actionFlags(); in TEST_F()
308 ID id{ID::Pel(pelID)}; in TEST_F()
324 ID id{ID::Pel(pelID)}; in TEST_F()
338 // Add a PEL to the repo in TEST_F()
340 auto pel = std::make_unique<PEL>(data); in TEST_F() local
342 ID id{ID::Pel(pel->id())}; in TEST_F()
347 repo.add(pel); in TEST_F()
352 repo.setPELHostTransState(pel->id(), TransmissionState::acked); in TEST_F()
358 // Next, check the PEL data itself in TEST_F()
360 PEL newPEL{*pelData}; in TEST_F()
372 // Next, check the PEL data itself in TEST_F()
374 PEL newPEL{*pelData}; in TEST_F()
381 // Add a PEL to the repo in TEST_F()
383 auto pel = std::make_unique<PEL>(data); in TEST_F() local
385 ID id{ID::Pel(pel->id())}; in TEST_F()
390 repo.add(pel); in TEST_F()
395 repo.setPELHMCTransState(pel->id(), TransmissionState::acked); in TEST_F()
401 // Next, check the PEL data itself in TEST_F()
403 PEL newPEL{*pelData}; in TEST_F()
415 // Next, check the PEL data itself in TEST_F()
417 PEL newPEL{*pelData}; in TEST_F()
427 auto pel = std::make_unique<PEL>(data); in TEST_F() local
428 pel->setCommitTime(); in TEST_F()
429 pel->assignID(); in TEST_F()
431 repo.add(pel); in TEST_F()
434 ID id{ID::Pel(pel->id())}; in TEST_F()
447 // Read the PEL data out of the FD in TEST_F()
456 PEL newPEL{newData}; in TEST_F()
459 EXPECT_EQ(newPEL.id(), pel->id()); in TEST_F()
477 // All of the size stats are the sizes on disk a PEL takes up, in TEST_F()
496 auto pel = std::make_unique<PEL>(data); in TEST_F() local
497 auto pelID1 = pel->id(); in TEST_F()
498 repo.add(pel); in TEST_F()
513 pel = std::make_unique<PEL>(data); in TEST_F()
514 auto pelID2 = pel->id(); in TEST_F()
515 repo.add(pel); in TEST_F()
530 pel = std::make_unique<PEL>(data); in TEST_F()
531 auto pelID3 = pel->id(); in TEST_F()
532 repo.add(pel); in TEST_F()
547 pel = std::make_unique<PEL>(data); in TEST_F()
548 auto pelID4 = pel->id(); in TEST_F()
549 repo.add(pel); in TEST_F()
564 ID id1{ID::Pel(pelID1)}; in TEST_F()
579 ID id4{ID::Pel(pelID4)}; in TEST_F()
594 ID id2{ID::Pel(pelID2)}; in TEST_F()
609 ID id3{ID::Pel(pelID3)}; in TEST_F()
636 auto pel = std::make_unique<PEL>(data); in TEST_F() local
637 repo.add(pel); in TEST_F()
641 pel = std::make_unique<PEL>(data); in TEST_F()
642 repo.add(pel); in TEST_F()
646 pel = std::make_unique<PEL>(data); in TEST_F()
647 repo.add(pel); in TEST_F()
651 pel = std::make_unique<PEL>(data); in TEST_F()
652 repo.add(pel); in TEST_F()
662 Repository::LogID logID{Repository::LogID::Pel{i}}; in TEST_F()
680 Repository::LogID logID{Repository::LogID::Pel{i}}; in TEST_F()
684 // 500 + the PEL ID is in the list. in TEST_F()
689 // Test that if filled completely with 1 type of PEL, that
700 auto pel = std::make_unique<PEL>(data); in TEST_F() local
701 repo.add(pel); in TEST_F()
713 Repository::LogID logID{Repository::LogID::Pel{i}}; in TEST_F()
731 Repository::LogID logID{Repository::LogID::Pel{i}}; in TEST_F()
749 auto pel = std::make_unique<PEL>(data); in TEST_F() local
750 repo.add(pel); in TEST_F()
753 // Add another PEL to push it over the 30%, each time adding in TEST_F()
759 auto pel = std::make_unique<PEL>(data); in TEST_F() local
760 auto idToDelete = pel->obmcLogID(); in TEST_F()
761 repo.add(pel); in TEST_F()
765 repo.setPELHMCTransState(pel->id(), TransmissionState::acked); in TEST_F()
769 repo.setPELHostTransState(pel->id(), TransmissionState::acked); in TEST_F()
773 repo.setPELHostTransState(pel->id(), TransmissionState::sent); in TEST_F()
779 // The newest PEL should be the one deleted in TEST_F()
795 auto pel = std::make_unique<PEL>(data); in TEST_F() local
796 repo.add(pel); in TEST_F()
804 // Add 1 more PEL which will be too many. in TEST_F()
807 auto pel = std::make_unique<PEL>(data); in TEST_F() local
808 repo.add(pel); in TEST_F()
818 // The OpenBMC log ID is the PEL ID + 500. in TEST_F()
836 auto pel = std::make_unique<PEL>(data); in TEST_F() local
837 repo.add(pel); in TEST_F()
844 auto pel = std::make_unique<PEL>(data); in TEST_F() local
845 repo.add(pel); in TEST_F()
860 auto pel = std::make_unique<PEL>(data); in TEST_F() local
861 repo.add(pel); in TEST_F()
869 auto pel = std::make_unique<PEL>(data); in TEST_F() local
870 repo.add(pel); in TEST_F()
879 using pelID = Repository::LogID::Pel; in TEST_F()
882 // Add and remove a PEL from the repo in TEST_F()
890 auto pel = std::make_unique<PEL>(data, 1); in TEST_F() local
892 pel->assignID(); in TEST_F()
893 Repository::LogID id{pelID{pel->id()}, obmcID{pel->obmcLogID()}}; in TEST_F()
895 repo.add(pel); in TEST_F()
898 Repository::getPELFilename(pel->id(), pel->commitTime()); in TEST_F()
905 archivePath /= Repository::getPELFilename(pel->id(), pel->commitTime()); in TEST_F()
914 using pelID = Repository::LogID::Pel; in TEST_F()
917 // Create repo with max PEL=500 and space=4096*100 in TEST_F()
924 auto pel = std::make_unique<PEL>(data); in TEST_F() local
925 repo.add(pel); in TEST_F()
928 // Add another PEL which makes 95% still ok in TEST_F()
930 auto pel = std::make_unique<PEL>(data, 1); in TEST_F() local
931 pel->assignID(); in TEST_F()
932 Repository::LogID id{pelID{pel->id()}, obmcID{pel->obmcLogID()}}; in TEST_F()
933 repo.add(pel); in TEST_F()
938 // Remove last created PEL in TEST_F()
941 // Repo is 94% full with one PEL in archive log in TEST_F()
951 archivePath /= Repository::getPELFilename(pel->id(), pel->commitTime()); in TEST_F()
954 // Add another PEL which makes repo 95% full in TEST_F()
956 pel = std::make_unique<PEL>(data, 1); in TEST_F()
957 pel->assignID(); in TEST_F()
958 Repository::LogID idx{pelID{pel->id()}, obmcID{pel->obmcLogID()}}; in TEST_F()
959 repo.add(pel); in TEST_F()
974 auto pel = std::make_unique<PEL>(data, 1); in TEST_F() local
976 pel->assignID(); in TEST_F()
978 repo.add(pel); in TEST_F()
980 // Getting by PEL Id in TEST_F()
981 Repository::LogID idWithPelId{Repository::LogID::Pel(pel->id())}; in TEST_F()
984 EXPECT_EQ(logID->obmcID.id, pel->obmcLogID()); in TEST_F()
985 EXPECT_EQ(logID->pelID.id, pel->id()); in TEST_F()
989 Repository::LogID::Obmc(pel->obmcLogID())}; in TEST_F()
992 EXPECT_EQ(logID->obmcID.id, pel->obmcLogID()); in TEST_F()
993 EXPECT_EQ(logID->pelID.id, pel->id()); in TEST_F()
1002 auto pel = std::make_unique<PEL>(data, 1); in TEST_F() local
1004 pel->assignID(); in TEST_F()
1006 repo.add(pel); in TEST_F()
1008 // Getting by invalid PEL Id in TEST_F()
1009 Repository::LogID idWithPelId{Repository::LogID::Pel(0xFFFFFFFF)}; in TEST_F()
1029 auto pel = std::make_unique<PEL>(data); in TEST_F() local
1030 repo.add(pel); in TEST_F()
1038 // Add 1 more PEL which will be too many. in TEST_F()
1041 auto pel = std::make_unique<PEL>(data); in TEST_F() local
1042 repo.add(pel); in TEST_F()
1053 // The OpenBMC log ID is the PEL ID + 500. in TEST_F()