Lines Matching refs:regs
16 struct efi_image_regions *regs; in lib_test_efi_image_region_add() local
18 regs = calloc(sizeof(*regs) + in lib_test_efi_image_region_add()
20 ut_assert(regs); in lib_test_efi_image_region_add()
22 regs->max = UT_REG_CAPACITY; in lib_test_efi_image_region_add()
24 ut_asserteq(0, regs->num); in lib_test_efi_image_region_add()
26 efi_image_region_add(regs, (void *)0x4000, in lib_test_efi_image_region_add()
28 ut_asserteq(0, regs->num); in lib_test_efi_image_region_add()
30 efi_image_region_add(regs, (void *)0x3100, in lib_test_efi_image_region_add()
32 ut_asserteq(1, regs->num); in lib_test_efi_image_region_add()
34 efi_image_region_add(regs, (void *)0x2000, in lib_test_efi_image_region_add()
36 ut_asserteq(2, regs->num); in lib_test_efi_image_region_add()
38 efi_image_region_add(regs, (void *)0x1000, in lib_test_efi_image_region_add()
40 ut_asserteq(3, regs->num); in lib_test_efi_image_region_add()
42 efi_image_region_add(regs, (void *)0x4000, in lib_test_efi_image_region_add()
44 ut_asserteq(4, regs->num); in lib_test_efi_image_region_add()
46 efi_image_region_add(regs, (void *)0x1f00, in lib_test_efi_image_region_add()
48 ut_asserteq(5, regs->num); in lib_test_efi_image_region_add()
50 ut_asserteq_ptr((void *)0x3100, regs->reg[0].data); in lib_test_efi_image_region_add()
51 ut_asserteq(0x0f00, regs->reg[0].size); in lib_test_efi_image_region_add()
53 ut_asserteq_ptr((void *)0x2000, regs->reg[1].data); in lib_test_efi_image_region_add()
54 ut_asserteq(0x1100, regs->reg[1].size); in lib_test_efi_image_region_add()
56 ut_asserteq_ptr((void *)0x1000, regs->reg[2].data); in lib_test_efi_image_region_add()
57 ut_asserteq(0x0f00, regs->reg[2].size); in lib_test_efi_image_region_add()
59 ut_asserteq_ptr((void *)0x4000, regs->reg[3].data); in lib_test_efi_image_region_add()
60 ut_asserteq(0x0e00, regs->reg[3].size); in lib_test_efi_image_region_add()
62 ut_asserteq_ptr((void *)0x1f00, regs->reg[4].data); in lib_test_efi_image_region_add()
63 ut_asserteq(0x0101, regs->reg[4].size); in lib_test_efi_image_region_add()
65 free(regs); in lib_test_efi_image_region_add()
74 struct efi_image_regions *regs; in lib_test_efi_image_region_sort() local
76 regs = calloc(sizeof(*regs) + in lib_test_efi_image_region_sort()
78 ut_assert(regs); in lib_test_efi_image_region_sort()
80 regs->max = UT_REG_CAPACITY; in lib_test_efi_image_region_sort()
82 ut_asserteq(0, regs->num); in lib_test_efi_image_region_sort()
84 efi_image_region_add(regs, (void *)0x4000, in lib_test_efi_image_region_sort()
86 ut_asserteq(0, regs->num); in lib_test_efi_image_region_sort()
88 efi_image_region_add(regs, (void *)0x3100, in lib_test_efi_image_region_sort()
90 ut_asserteq(1, regs->num); in lib_test_efi_image_region_sort()
92 efi_image_region_add(regs, (void *)0x2000, in lib_test_efi_image_region_sort()
94 ut_asserteq(2, regs->num); in lib_test_efi_image_region_sort()
96 efi_image_region_add(regs, (void *)0x1000, in lib_test_efi_image_region_sort()
98 ut_asserteq(3, regs->num); in lib_test_efi_image_region_sort()
100 efi_image_region_add(regs, (void *)0x4000, in lib_test_efi_image_region_sort()
102 ut_asserteq(4, regs->num); in lib_test_efi_image_region_sort()
104 efi_image_region_add(regs, (void *)0x1f00, in lib_test_efi_image_region_sort()
106 ut_asserteq(4, regs->num); in lib_test_efi_image_region_sort()
108 efi_image_region_add(regs, (void *)0x10ff, in lib_test_efi_image_region_sort()
110 ut_asserteq(4, regs->num); in lib_test_efi_image_region_sort()
112 efi_image_region_add(regs, (void *)0x0000, in lib_test_efi_image_region_sort()
114 ut_asserteq(4, regs->num); in lib_test_efi_image_region_sort()
116 efi_image_region_add(regs, (void *)0x3100, in lib_test_efi_image_region_sort()
118 ut_asserteq(4, regs->num); in lib_test_efi_image_region_sort()
120 efi_image_region_add(regs, (void *)0x3200, in lib_test_efi_image_region_sort()
122 ut_asserteq(4, regs->num); in lib_test_efi_image_region_sort()
124 efi_image_region_add(regs, (void *)0x3200, in lib_test_efi_image_region_sort()
126 ut_asserteq(4, regs->num); in lib_test_efi_image_region_sort()
128 efi_image_region_add(regs, (void *)0x1f00, in lib_test_efi_image_region_sort()
130 ut_asserteq(5, regs->num); in lib_test_efi_image_region_sort()
132 efi_image_region_add(regs, (void *)0x4000, in lib_test_efi_image_region_sort()
134 ut_asserteq(6, regs->num); in lib_test_efi_image_region_sort()
136 efi_image_region_add(regs, (void *)0x6000, in lib_test_efi_image_region_sort()
138 ut_asserteq(6, regs->num); in lib_test_efi_image_region_sort()
140 ut_asserteq_ptr((void *)0x1000, regs->reg[0].data); in lib_test_efi_image_region_sort()
141 ut_asserteq(0x0f00, regs->reg[0].size); in lib_test_efi_image_region_sort()
143 ut_asserteq_ptr((void *)0x1f00, regs->reg[1].data); in lib_test_efi_image_region_sort()
144 ut_asserteq(0x0100, regs->reg[1].size); in lib_test_efi_image_region_sort()
146 ut_asserteq_ptr((void *)0x2000, regs->reg[2].data); in lib_test_efi_image_region_sort()
147 ut_asserteq(0x1100, regs->reg[2].size); in lib_test_efi_image_region_sort()
149 ut_asserteq_ptr((void *)0x3100, regs->reg[3].data); in lib_test_efi_image_region_sort()
150 ut_asserteq(0x0f00, regs->reg[3].size); in lib_test_efi_image_region_sort()
152 ut_asserteq_ptr((void *)0x4000, regs->reg[4].data); in lib_test_efi_image_region_sort()
153 ut_asserteq(0x0000, regs->reg[4].size); in lib_test_efi_image_region_sort()
155 ut_asserteq_ptr((void *)0x4000, regs->reg[5].data); in lib_test_efi_image_region_sort()
156 ut_asserteq(0x0e00, regs->reg[5].size); in lib_test_efi_image_region_sort()
158 free(regs); in lib_test_efi_image_region_sort()