Lines Matching refs:bmap
73 const unsigned long *exp_bmap, const unsigned long *bmap, in __check_eq_bitmap() argument
76 if (!bitmap_equal(exp_bmap, bmap, nbits)) { in __check_eq_bitmap()
79 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap()
178 DECLARE_BITMAP(bmap, 1024); in test_zero_clear()
181 memset(bmap, 0xff, 128); in test_zero_clear()
183 expect_eq_pbl("0-22", bmap, 23); in test_zero_clear()
184 expect_eq_pbl("0-1023", bmap, 1024); in test_zero_clear()
187 bitmap_clear(bmap, 0, 9); in test_zero_clear()
188 expect_eq_pbl("9-1023", bmap, 1024); in test_zero_clear()
190 bitmap_zero(bmap, 35); in test_zero_clear()
191 expect_eq_pbl("64-1023", bmap, 1024); in test_zero_clear()
194 bitmap_clear(bmap, 79, 19); in test_zero_clear()
195 expect_eq_pbl("64-78,98-1023", bmap, 1024); in test_zero_clear()
197 bitmap_zero(bmap, 115); in test_zero_clear()
198 expect_eq_pbl("128-1023", bmap, 1024); in test_zero_clear()
201 bitmap_zero(bmap, 1024); in test_zero_clear()
202 expect_eq_pbl("", bmap, 1024); in test_zero_clear()
207 DECLARE_BITMAP(bmap, 1024); in test_fill_set()
210 memset(bmap, 0x00, 128); in test_fill_set()
212 expect_eq_pbl("", bmap, 23); in test_fill_set()
213 expect_eq_pbl("", bmap, 1024); in test_fill_set()
216 bitmap_set(bmap, 0, 9); in test_fill_set()
217 expect_eq_pbl("0-8", bmap, 1024); in test_fill_set()
219 bitmap_fill(bmap, 35); in test_fill_set()
220 expect_eq_pbl("0-63", bmap, 1024); in test_fill_set()
223 bitmap_set(bmap, 79, 19); in test_fill_set()
224 expect_eq_pbl("0-63,79-97", bmap, 1024); in test_fill_set()
226 bitmap_fill(bmap, 115); in test_fill_set()
227 expect_eq_pbl("0-127", bmap, 1024); in test_fill_set()
230 bitmap_fill(bmap, 1024); in test_fill_set()
231 expect_eq_pbl("0-1023", bmap, 1024); in test_fill_set()
279 DECLARE_BITMAP(bmap, 1024); in test_replace()
283 bitmap_zero(bmap, 1024); in test_replace()
284 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
285 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace()
287 bitmap_zero(bmap, 1024); in test_replace()
288 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
289 expect_eq_bitmap(bmap, exp3_1_0, nbits); in test_replace()
291 bitmap_fill(bmap, 1024); in test_replace()
292 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
293 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace()
295 bitmap_fill(bmap, 1024); in test_replace()
296 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
297 expect_eq_bitmap(bmap, exp3_1_0, nbits); in test_replace()
362 DECLARE_BITMAP(bmap, 2048); in test_bitmap_parselist()
368 err = bitmap_parselist(ptest.in, bmap, ptest.nbits); in test_bitmap_parselist()
378 && !__bitmap_equal(bmap, ptest.expected, ptest.nbits)) { in test_bitmap_parselist()
380 i, ptest.in, bmap[0], in test_bitmap_parselist()
438 DECLARE_BITMAP(bmap, 2048); in test_bitmap_parse()
445 err = bitmap_parse(test.in, len, bmap, test.nbits); in test_bitmap_parse()
455 && !__bitmap_equal(bmap, test.expected, test.nbits)) { in test_bitmap_parse()
457 i, test.in, bmap[0], in test_bitmap_parse()