MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_bitmap_all_clear

Function test_bitmap_all_clear

dpdk/app/test/test_bitmap.c:180–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180static int
181test_bitmap_all_clear(void)
182{
183 void *mem;
184 uint32_t bmp_size;
185 struct rte_bitmap *bmp;
186
187 bmp_size =
188 rte_bitmap_get_memory_footprint(MAX_BITS);
189
190 mem = rte_zmalloc("test_bmap", bmp_size, RTE_CACHE_LINE_SIZE);
191 if (mem == NULL) {
192 printf("Failed to allocate memory for bitmap\n");
193 return TEST_FAILED;
194 }
195
196 bmp = rte_bitmap_init(MAX_BITS, mem, bmp_size);
197 if (bmp == NULL) {
198 printf("Failed to init bitmap\n");
199 return TEST_FAILED;
200 }
201
202 if (test_bitmap_set_get_clear(bmp) < 0)
203 return TEST_FAILED;
204
205 if (test_bitmap_slab_set_get(bmp) < 0)
206 return TEST_FAILED;
207
208 if (test_bitmap_scan_operations(bmp) < 0)
209 return TEST_FAILED;
210
211 rte_bitmap_free(bmp);
212 rte_free(mem);
213
214 return TEST_SUCCESS;
215}
216
217static int
218test_bitmap_all_set(void)

Callers 1

test_bitmapFunction · 0.85

Calls 9

rte_zmallocFunction · 0.85
rte_bitmap_initFunction · 0.85
test_bitmap_slab_set_getFunction · 0.85
rte_bitmap_freeFunction · 0.85
rte_freeFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected