Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_bitmap.c Create Date:2022-07-28 06:32:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:test_copy

Proto:static void __init test_copy(void)

Type:void

Parameter:Nothing

236  DECLARE_BITMAP(bmap1, 1024)
237  DECLARE_BITMAP(bmap2, 1024)
239  bitmap_zero(bmap1, 1024)
240  bitmap_zero(bmap2, 1024)
243  bitmap_set(bmap1, 0, 19)
244  bitmap_copy(bmap2, bmap1, 23)
245  expect_eq_pbl("0-18", bmap2, 1024)
247  bitmap_set(bmap2, 0, 23)
248  bitmap_copy(bmap2, bmap1, 23)
249  expect_eq_pbl("0-18", bmap2, 1024)
252  bitmap_set(bmap1, 0, 109)
253  bitmap_copy(bmap2, bmap1, 1024)
254  expect_eq_pbl("0-108", bmap2, 1024)
256  bitmap_fill(bmap2, 1024)
257  bitmap_copy(bmap2, bmap1, 1024)
258  expect_eq_pbl("0-108", bmap2, 1024)
264  bitmap_fill(bmap2, 1024)
265  bitmap_copy(bmap2, bmap1, 109)
266  expect_eq_pbl("0-108,128-1023", bmap2, 1024)
268  bitmap_fill(bmap2, 1024)
269  bitmap_copy(bmap2, bmap1, 97)
270  expect_eq_pbl("0-108,128-1023", bmap2, 1024)
Caller
NameDescribe
selftest