Lines Matching refs:repo

15     auto repo = pldm_pdr_init();  in TEST()  local
16 EXPECT_EQ(pldm_pdr_get_record_count(repo), 0u); in TEST()
17 EXPECT_EQ(pldm_pdr_get_repo_size(repo), 0u); in TEST()
18 pldm_pdr_destroy(repo); in TEST()
23 auto repo = pldm_pdr_init(); in TEST() local
27 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle), in TEST()
30 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
31 EXPECT_EQ(pldm_pdr_get_repo_size(repo), data.size()); in TEST()
34 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle), in TEST()
39 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle), in TEST()
44 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle), in TEST()
47 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
48 EXPECT_EQ(pldm_pdr_get_repo_size(repo), data.size() * 4u); in TEST()
50 pldm_pdr_destroy(repo); in TEST()
57 auto repo = pldm_pdr_init(); in TEST() local
59 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
60 pldm_pdr_remove_pdrs_by_terminus_handle(repo, 1); in TEST()
61 EXPECT_EQ(pldm_pdr_get_record_count(repo), 0u); in TEST()
62 pldm_pdr_destroy(repo); in TEST()
64 repo = pldm_pdr_init(); in TEST()
65 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 2, NULL), 0); in TEST()
66 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
67 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2u); in TEST()
68 pldm_pdr_remove_pdrs_by_terminus_handle(repo, 1); in TEST()
69 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
70 pldm_pdr_destroy(repo); in TEST()
72 repo = pldm_pdr_init(); in TEST()
73 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
74 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 2, NULL), 0); in TEST()
75 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 2, NULL), 0); in TEST()
76 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3u); in TEST()
77 pldm_pdr_remove_pdrs_by_terminus_handle(repo, 2); in TEST()
78 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
79 pldm_pdr_destroy(repo); in TEST()
81 repo = pldm_pdr_init(); in TEST()
82 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
83 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 2, NULL), 0); in TEST()
84 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
85 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3u); in TEST()
86 pldm_pdr_remove_remote_pdrs(repo); in TEST()
87 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
88 pldm_pdr_remove_pdrs_by_terminus_handle(repo, 1); in TEST()
89 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
90 pldm_pdr_remove_pdrs_by_terminus_handle(repo, 2); in TEST()
91 EXPECT_EQ(pldm_pdr_get_record_count(repo), 0u); in TEST()
92 pldm_pdr_destroy(repo); in TEST()
99 auto repo = pldm_pdr_init(); in TEST() local
100 pldm_pdr_remove_remote_pdrs(repo); in TEST()
101 EXPECT_EQ(pldm_pdr_get_record_count(repo), 0u); in TEST()
102 pldm_pdr_destroy(repo); in TEST()
104 repo = pldm_pdr_init(); in TEST()
105 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
106 pldm_pdr_remove_remote_pdrs(repo); in TEST()
107 EXPECT_EQ(pldm_pdr_get_record_count(repo), 0u); in TEST()
108 pldm_pdr_destroy(repo); in TEST()
110 repo = pldm_pdr_init(); in TEST()
111 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
112 pldm_pdr_remove_remote_pdrs(repo); in TEST()
113 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
114 pldm_pdr_destroy(repo); in TEST()
116 repo = pldm_pdr_init(); in TEST()
117 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
118 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
119 pldm_pdr_remove_remote_pdrs(repo); in TEST()
120 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
121 pldm_pdr_destroy(repo); in TEST()
123 repo = pldm_pdr_init(); in TEST()
124 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
125 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
126 pldm_pdr_remove_remote_pdrs(repo); in TEST()
127 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
128 pldm_pdr_destroy(repo); in TEST()
130 repo = pldm_pdr_init(); in TEST()
131 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
132 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
133 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
134 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
135 pldm_pdr_remove_remote_pdrs(repo); in TEST()
136 EXPECT_EQ(pldm_pdr_get_record_count(repo), 0u); in TEST()
137 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
138 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
139 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2u); in TEST()
140 pldm_pdr_destroy(repo); in TEST()
142 repo = pldm_pdr_init(); in TEST()
143 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
144 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
145 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
146 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
147 pldm_pdr_remove_remote_pdrs(repo); in TEST()
148 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
149 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
150 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
151 EXPECT_EQ(pldm_pdr_get_record_count(repo), 6u); in TEST()
152 pldm_pdr_destroy(repo); in TEST()
154 repo = pldm_pdr_init(); in TEST()
155 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
156 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
157 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
158 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
159 pldm_pdr_remove_remote_pdrs(repo); in TEST()
160 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3u); in TEST()
161 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
162 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
163 EXPECT_EQ(pldm_pdr_get_record_count(repo), 5u); in TEST()
164 pldm_pdr_destroy(repo); in TEST()
166 repo = pldm_pdr_init(); in TEST()
167 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
168 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
169 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
170 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
171 pldm_pdr_remove_remote_pdrs(repo); in TEST()
172 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3u); in TEST()
173 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
174 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
175 EXPECT_EQ(pldm_pdr_get_record_count(repo), 5u); in TEST()
176 pldm_pdr_destroy(repo); in TEST()
178 repo = pldm_pdr_init(); in TEST()
179 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
180 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
181 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
182 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
183 pldm_pdr_remove_remote_pdrs(repo); in TEST()
184 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2u); in TEST()
185 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
186 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
187 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
188 pldm_pdr_destroy(repo); in TEST()
190 repo = pldm_pdr_init(); in TEST()
191 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
192 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
193 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
194 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
195 pldm_pdr_remove_remote_pdrs(repo); in TEST()
196 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3u); in TEST()
197 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
198 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
199 EXPECT_EQ(pldm_pdr_get_record_count(repo), 5u); in TEST()
200 pldm_pdr_destroy(repo); in TEST()
202 repo = pldm_pdr_init(); in TEST()
203 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
204 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
205 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
206 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
207 pldm_pdr_remove_remote_pdrs(repo); in TEST()
208 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2u); in TEST()
209 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
210 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
211 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
212 pldm_pdr_destroy(repo); in TEST()
214 repo = pldm_pdr_init(); in TEST()
215 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
216 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
217 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
218 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
219 pldm_pdr_remove_remote_pdrs(repo); in TEST()
220 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
221 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
222 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
223 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3u); in TEST()
224 pldm_pdr_destroy(repo); in TEST()
226 repo = pldm_pdr_init(); in TEST()
227 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
228 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
229 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
230 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
231 pldm_pdr_remove_remote_pdrs(repo); in TEST()
232 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
233 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
234 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
235 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3u); in TEST()
236 pldm_pdr_destroy(repo); in TEST()
238 repo = pldm_pdr_init(); in TEST()
239 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
240 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
241 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
242 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
243 pldm_pdr_remove_remote_pdrs(repo); in TEST()
244 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2u); in TEST()
245 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
246 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
247 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
248 pldm_pdr_destroy(repo); in TEST()
250 repo = pldm_pdr_init(); in TEST()
251 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
252 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
253 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, NULL), 0); in TEST()
254 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, NULL), 0); in TEST()
255 pldm_pdr_remove_remote_pdrs(repo); in TEST()
256 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2u); in TEST()
258 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle), in TEST()
262 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, &handle), in TEST()
265 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
266 pldm_pdr_destroy(repo); in TEST()
271 auto repo = pldm_pdr_init(); in TEST() local
276 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in.data()), in TEST()
279 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
280 EXPECT_EQ(pldm_pdr_get_repo_size(repo), sizeof(in)); in TEST()
284 auto hdl = pldm_pdr_find_record(repo, 0, &outData, &size, &nextRecHdl); in TEST()
291 auto hdl2 = pldm_pdr_find_record(repo, 1, &outData, &size, &nextRecHdl); in TEST()
299 hdl = pldm_pdr_find_record(repo, htole32(0xdeaddead), &outData, &size, in TEST()
311 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()), in TEST()
316 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()), in TEST()
321 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()), in TEST()
324 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
325 EXPECT_EQ(pldm_pdr_get_repo_size(repo), sizeof(in2) * 4); in TEST()
326 hdl = pldm_pdr_find_record(repo, 0, &outData, &size, &nextRecHdl); in TEST()
332 hdl2 = pldm_pdr_find_record(repo, 1, &outData, &size, &nextRecHdl); in TEST()
339 hdl = pldm_pdr_find_record(repo, 2, &outData, &size, &nextRecHdl); in TEST()
345 hdl = pldm_pdr_find_record(repo, 3, &outData, &size, &nextRecHdl); in TEST()
352 hdl = pldm_pdr_find_record(repo, 4, &outData, &size, &nextRecHdl); in TEST()
360 pldm_pdr_destroy(repo); in TEST()
365 auto repo = pldm_pdr_init(); in TEST() local
370 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in.data()), in TEST()
373 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
374 EXPECT_EQ(pldm_pdr_get_repo_size(repo), sizeof(in)); in TEST()
378 auto hdl = pldm_pdr_find_record(repo, 0, &outData, &size, &nextRecHdl); in TEST()
389 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()), in TEST()
394 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()), in TEST()
399 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()), in TEST()
402 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
403 EXPECT_EQ(pldm_pdr_get_repo_size(repo), sizeof(in2) * 4); in TEST()
404 hdl = pldm_pdr_get_next_record(repo, hdl, &outData, &size, &nextRecHdl); in TEST()
410 hdl = pldm_pdr_get_next_record(repo, hdl, &outData, &size, &nextRecHdl); in TEST()
416 hdl = pldm_pdr_get_next_record(repo, hdl, &outData, &size, &nextRecHdl); in TEST()
423 pldm_pdr_destroy(repo); in TEST()
428 auto repo = pldm_pdr_init(); in TEST() local
435 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &first), in TEST()
439 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &second), in TEST()
443 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &third), in TEST()
447 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &fourth), in TEST()
453 pldm_pdr_find_record_by_type(repo, 1, nullptr, &outData, &size); in TEST()
454 EXPECT_EQ(pldm_pdr_get_record_handle(repo, firstRec), first); in TEST()
457 pldm_pdr_find_record_by_type(repo, 2, nullptr, &outData, &size); in TEST()
458 EXPECT_EQ(pldm_pdr_get_record_handle(repo, secondRec), second); in TEST()
461 pldm_pdr_find_record_by_type(repo, 3, nullptr, &outData, &size); in TEST()
462 EXPECT_EQ(pldm_pdr_get_record_handle(repo, thirdRec), third); in TEST()
465 pldm_pdr_find_record_by_type(repo, 4, nullptr, &outData, &size); in TEST()
466 EXPECT_EQ(pldm_pdr_get_record_handle(repo, fourthRec), fourth); in TEST()
469 pldm_pdr_find_record_by_type(repo, 5, nullptr, &outData, &size); in TEST()
475 pldm_pdr_find_record_by_type(repo, 3, secondRec, &outData, &size); in TEST()
476 EXPECT_EQ(pldm_pdr_get_record_handle(repo, rec), third); in TEST()
478 rec = pldm_pdr_find_record_by_type(repo, 4, secondRec, &outData, &size); in TEST()
479 EXPECT_EQ(pldm_pdr_get_record_handle(repo, rec), fourth); in TEST()
481 rec = pldm_pdr_find_record_by_type(repo, 2, firstRec, &outData, &size); in TEST()
482 EXPECT_EQ(pldm_pdr_get_record_handle(repo, rec), second); in TEST()
485 pldm_pdr_destroy(repo); in TEST()
490 auto repo = pldm_pdr_init(); in TEST() local
493 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 10, 1, 0, 100, &handle), 0); in TEST()
495 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
496 EXPECT_EQ(pldm_pdr_get_repo_size(repo), in TEST()
501 auto hdl = pldm_pdr_find_record(repo, 0, &outData, &size, &nextRecHdl); in TEST()
522 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 2, 11, 2, 1, 101, &handle), 0); in TEST()
524 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2u); in TEST()
525 EXPECT_EQ(pldm_pdr_get_repo_size(repo), in TEST()
527 hdl = pldm_pdr_find_record(repo, 2, &outData, &size, &nextRecHdl); in TEST()
547 hdl = pldm_pdr_find_record(repo, 1, &outData, &size, &nextRecHdl); in TEST()
567 pldm_pdr_destroy(repo); in TEST()
572 auto repo = pldm_pdr_init(); in TEST() local
579 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 1, 1, 0, 100, &first), 0); in TEST()
581 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 2, 1, 1, 100, &second), 0); in TEST()
583 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 3, 1, 2, 100, &third), 0); in TEST()
585 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
586 repo, 1, &terminusHdl, &entityType, in TEST()
589 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
590 repo, 2, &terminusHdl, &entityType, in TEST()
593 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
594 repo, 3, &terminusHdl, &entityType, in TEST()
601 repo, 4, &terminusHdl, &entityType, in TEST()
604 pldm_pdr_destroy(repo); in TEST()
610 auto repo = pldm_pdr_init(); in TEST() local
614 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle1), in TEST()
617 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle2), in TEST()
620 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), false, 1, &handle3), in TEST()
623 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, &handle4), in TEST()
626 EXPECT_EQ(pldm_pdr_add(repo, data.data(), data.size(), true, 1, &handle5), in TEST()
629 auto rec1 = pldm_pdr_find_last_in_range(repo, 0, 100); in TEST()
630 auto rec2 = pldm_pdr_find_last_in_range(repo, 16777300, 33554431); in TEST()
633 EXPECT_NE(handle1, pldm_pdr_get_record_handle(repo, rec1)); in TEST()
634 EXPECT_NE(handle2, pldm_pdr_get_record_handle(repo, rec1)); in TEST()
635 EXPECT_EQ(handle3, pldm_pdr_get_record_handle(repo, rec1)); in TEST()
636 EXPECT_NE(handle4, pldm_pdr_get_record_handle(repo, rec2)); in TEST()
637 EXPECT_EQ(handle5, pldm_pdr_get_record_handle(repo, rec2)); in TEST()
639 pldm_pdr_destroy(repo); in TEST()
647 auto repo = pldm_pdr_init(); in TEST() local
654 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<const uint8_t*>(&hdr), in TEST()
661 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<const uint8_t*>(&hdr), in TEST()
668 EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<const uint8_t*>(&hdr), in TEST()
676 pldm_pdr_find_record_by_type(repo, 1, nullptr, &outData, &size); in TEST()
677 EXPECT_EQ(pldm_pdr_get_terminus_handle(repo, firstRec), in TEST()
682 pldm_pdr_find_record_by_type(repo, 2, nullptr, &outData, &size); in TEST()
683 EXPECT_EQ(pldm_pdr_get_terminus_handle(repo, secondRec), in TEST()
688 pldm_pdr_find_record_by_type(repo, 3, nullptr, &outData, &size); in TEST()
689 EXPECT_EQ(pldm_pdr_get_terminus_handle(repo, thirdRec), in TEST()
693 pldm_pdr_destroy(repo); in TEST()
1182 auto repo = pldm_pdr_init(); in TEST() local
1183 int rc = pldm_entity_association_pdr_add(tree, repo, false, 1); in TEST()
1186 EXPECT_EQ(pldm_pdr_get_record_count(repo), 6u); in TEST()
1196 pldm_pdr_find_record(repo, currRecHandle, &data, &size, &nextRecHandle); in TEST()
1236 pldm_pdr_find_record(repo, currRecHandle, &data, &size, &nextRecHandle); in TEST()
1276 pldm_pdr_find_record(repo, currRecHandle, &data, &size, &nextRecHandle); in TEST()
1316 pldm_pdr_find_record(repo, currRecHandle, &data, &size, &nextRecHandle); in TEST()
1356 pldm_pdr_find_record(repo, currRecHandle, &data, &size, &nextRecHandle); in TEST()
1390 pldm_pdr_find_record(repo, currRecHandle, &data, &size, &nextRecHandle); in TEST()
1424 pldm_pdr_destroy(repo); in TEST()
1683 auto repo = pldm_pdr_init(); in TEST() local
1697 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 1, entities[1].entity_type, in TEST()
1705 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
1706 repo, 1, &terminusHdl, &entityType, in TEST()
1714 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 2, entities[2].entity_type, in TEST()
1722 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
1723 repo, 2, &terminusHdl, &entityType, in TEST()
1731 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 3, entities[3].entity_type, in TEST()
1739 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
1740 repo, 3, &terminusHdl, &entityType, in TEST()
1748 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 4, entities[4].entity_type, in TEST()
1756 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
1757 repo, 4, &terminusHdl, &entityType, in TEST()
1765 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 5, entities[5].entity_type, in TEST()
1773 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
1774 repo, 5, &terminusHdl, &entityType, in TEST()
1786 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 7, entities[7].entity_type, in TEST()
1794 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
1795 repo, 7, &terminusHdl, &entityType, in TEST()
1803 EXPECT_EQ(pldm_pdr_add_fru_record_set(repo, 1, 8, entities[8].entity_type, in TEST()
1811 repo, pldm_pdr_fru_record_set_find_by_rsi( in TEST()
1812 repo, 8, &terminusHdl, &entityType, in TEST()
1817 pldm_pdr_destroy(repo); in TEST()
1849 auto repo = pldm_pdr_init(); in TEST() local
1850 int rc = pldm_entity_association_pdr_add(tree, repo, false, 1); in TEST()
1853 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
1857 repo, 1, 1, 0, 0x01000000, 0x01ffffff, &container_id); in TEST()
1862 repo, 1, 1, 0, 0x00000001, 0x00ffffff, &container_id1); in TEST()
1865 pldm_pdr_destroy(repo); in TEST()
1894 auto repo = pldm_pdr_init(); in TEST() local
1897 l1, repo, &entities, 4, false, 1, 0), in TEST()
1900 l1, repo, &entities, 4, false, 1, 2), in TEST()
1903 l1, repo, &entities, 4, false, 1, 23), in TEST()
1906 l1, repo, &entities, 4, false, 1, 34), in TEST()
1909 EXPECT_EQ(pldm_pdr_get_record_count(repo), 4u); in TEST()
1914 auto hdl = pldm_pdr_find_record(repo, 0, &outData, &size, &nextRecHdl); in TEST()
1918 auto hdl1 = pldm_pdr_find_record(repo, 2, &outData, &size, &nextRecHdl); in TEST()
1925 auto hdl2 = pldm_pdr_find_record(repo, 23, &outData, &size, &nextRecHdl); in TEST()
1932 auto hdl3 = pldm_pdr_find_record(repo, 3, &outData, &size, &nextRecHdl); in TEST()
1936 pldm_pdr_destroy(repo); in TEST()
1968 auto repo = pldm_pdr_init(); in TEST() local
1971 l1, repo, &entities, 5, false, 1, 0), in TEST()
1974 l1, repo, &entities, 5, false, 1, 2), in TEST()
1977 l1, repo, &entities, 5, false, 1, 23), in TEST()
1980 l1, repo, &entities, 5, false, 1, 34), in TEST()
1983 l2a, repo, &entities, 5, false, 1, 3), in TEST()
1990 repo, &entity1[0], 2), in TEST()
1994 pldm_pdr_destroy(repo); in TEST()
2027 auto repo = pldm_pdr_init(); in TEST() local
2030 l1, repo, &entities, 5, false, 1, 0), in TEST()
2033 l1, repo, &entities, 5, false, 1, 2), in TEST()
2036 l1, repo, &entities, 5, false, 1, 23), in TEST()
2039 l1, repo, &entities, 5, false, 1, 34), in TEST()
2042 l2a, repo, &entities, 5, false, 1, 3), in TEST()
2054 repo, 34, &entity2[0], &entity3[0], &updated_record_handle), in TEST()
2060 pldm_pdr_destroy(repo); in TEST()
2097 auto repo = pldm_pdr_init(); in TEST() local
2100 l1, repo, &base, 4, false, 1, 3), in TEST()
2103 EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u); in TEST()
2110 repo, entity, false, &removed_record_handle), in TEST()
2114 pldm_pdr_destroy(repo); in TEST()
2122 auto repo = pldm_pdr_init(); in TEST() local
2125 int rc = pldm_pdr_add_fru_record_set(repo, 1, 1, 1, 0, 100, &record_handle); in TEST()
2128 rc = pldm_pdr_add_fru_record_set(repo, 1, 2, 1, 1, 100, &record_handle); in TEST()
2131 rc = pldm_pdr_add_fru_record_set(repo, 1, 3, 1, 2, 100, &record_handle); in TEST()
2133 EXPECT_EQ(pldm_pdr_get_record_count(repo), 3); in TEST()
2136 rc = pldm_pdr_remove_fru_record_set_by_rsi(repo, 2, false, in TEST()
2140 EXPECT_EQ(pldm_pdr_get_record_count(repo), 2); in TEST()
2147 repo, 1, &terminusHdl, &entityType, &entityInstanceNum, &containerId); in TEST()
2149 record_handle = pldm_pdr_get_record_handle(repo, record); in TEST()
2153 repo, 3, &terminusHdl, &entityType, &entityInstanceNum, &containerId); in TEST()
2155 record_handle = pldm_pdr_get_record_handle(repo, record); in TEST()
2159 repo, 2, &terminusHdl, &entityType, &entityInstanceNum, &containerId); in TEST()
2162 rc = pldm_pdr_remove_fru_record_set_by_rsi(repo, 1, false, in TEST()
2169 rc = pldm_pdr_remove_fru_record_set_by_rsi(repo, 1, false, in TEST()
2175 rc = pldm_pdr_remove_fru_record_set_by_rsi(repo, 3, false, in TEST()
2180 EXPECT_EQ(pldm_pdr_get_record_count(repo), 0); in TEST()
2182 pldm_pdr_destroy(repo); in TEST()