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

Function test_bitmap_slab_set_get

dpdk/app/test/test_bitmap.c:108–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108static int
109test_bitmap_slab_set_get(struct rte_bitmap *bmp)
110{
111 uint32_t pos = 0;
112 uint64_t slab_magic = 0xBADC0FFEEBADF00D;
113 uint64_t out_slab = 0;
114
115 rte_bitmap_reset(bmp);
116 rte_bitmap_set_slab(bmp, pos, slab_magic);
117
118 if (!rte_bitmap_scan(bmp, &pos, &out_slab)) {
119 printf("Failed to get slab from bitmap.\n");
120 return TEST_FAILED;
121 }
122
123
124 if (slab_magic != out_slab) {
125 printf("Invalid slab in bitmap.\n");
126 return TEST_FAILED;
127 }
128
129
130 return TEST_SUCCESS;
131}
132
133static int
134test_bitmap_set_get_clear(struct rte_bitmap *bmp)

Callers 1

test_bitmap_all_clearFunction · 0.85

Calls 4

rte_bitmap_resetFunction · 0.85
rte_bitmap_set_slabFunction · 0.85
rte_bitmap_scanFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected