Lines Matching refs:ASSERT_EQ

18 	ASSERT_EQ(memblock.memory.cnt, 0);  in memblock_initialization_check()
19 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check()
20 ASSERT_EQ(strcmp(memblock.memory.name, "memory"), 0); in memblock_initialization_check()
23 ASSERT_EQ(memblock.reserved.cnt, 0); in memblock_initialization_check()
24 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check()
25 ASSERT_EQ(strcmp(memblock.reserved.name, "reserved"), 0); in memblock_initialization_check()
27 ASSERT_EQ(memblock.bottom_up, false); in memblock_initialization_check()
28 ASSERT_EQ(memblock.current_limit, MEMBLOCK_ALLOC_ANYWHERE); in memblock_initialization_check()
57 ASSERT_EQ(rgn->base, r.base); in memblock_add_simple_check()
58 ASSERT_EQ(rgn->size, r.size); in memblock_add_simple_check()
60 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_simple_check()
61 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_simple_check()
90 ASSERT_EQ(rgn->base, r.base); in memblock_add_node_simple_check()
91 ASSERT_EQ(rgn->size, r.size); in memblock_add_node_simple_check()
93 ASSERT_EQ(rgn->nid, 1); in memblock_add_node_simple_check()
95 ASSERT_EQ(rgn->flags, MEMBLOCK_HOTPLUG); in memblock_add_node_simple_check()
97 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_node_simple_check()
98 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_node_simple_check()
139 ASSERT_EQ(rgn1->base, r1.base); in memblock_add_disjoint_check()
140 ASSERT_EQ(rgn1->size, r1.size); in memblock_add_disjoint_check()
142 ASSERT_EQ(rgn2->base, r2.base); in memblock_add_disjoint_check()
143 ASSERT_EQ(rgn2->size, r2.size); in memblock_add_disjoint_check()
145 ASSERT_EQ(memblock.memory.cnt, 2); in memblock_add_disjoint_check()
146 ASSERT_EQ(memblock.memory.total_size, r1.size + r2.size); in memblock_add_disjoint_check()
194 ASSERT_EQ(rgn->base, r2.base); in memblock_add_overlap_top_check()
195 ASSERT_EQ(rgn->size, total_size); in memblock_add_overlap_top_check()
197 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_overlap_top_check()
198 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_add_overlap_top_check()
246 ASSERT_EQ(rgn->base, r1.base); in memblock_add_overlap_bottom_check()
247 ASSERT_EQ(rgn->size, total_size); in memblock_add_overlap_bottom_check()
249 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_overlap_bottom_check()
250 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_add_overlap_bottom_check()
293 ASSERT_EQ(rgn->base, r1.base); in memblock_add_within_check()
294 ASSERT_EQ(rgn->size, r1.size); in memblock_add_within_check()
296 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_within_check()
297 ASSERT_EQ(memblock.memory.total_size, r1.size); in memblock_add_within_check()
322 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_twice_check()
323 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_twice_check()
371 ASSERT_EQ(rgn->base, r1.base); in memblock_add_between_check()
372 ASSERT_EQ(rgn->size, total_size); in memblock_add_between_check()
374 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_between_check()
375 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_add_between_check()
415 ASSERT_EQ(rgn->base, r.base); in memblock_add_near_max_check()
416 ASSERT_EQ(rgn->size, total_size); in memblock_add_near_max_check()
418 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_add_near_max_check()
419 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_add_near_max_check()
473 ASSERT_EQ(memblock.memory.cnt, i + 2); in memblock_add_many_check()
474 ASSERT_EQ(memblock.memory.total_size, new_memory_regions_size + in memblock_add_many_check()
482 ASSERT_EQ(memblock.memory.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_add_many_check()
485 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_add_many_check()
486 ASSERT_EQ(memblock.reserved.total_size, new_memory_regions_size); in memblock_add_many_check()
493 ASSERT_EQ(memblock.memory.regions[0].base, r.base); in memblock_add_many_check()
494 ASSERT_EQ(memblock.memory.regions[0].size, r.size); in memblock_add_many_check()
496 ASSERT_EQ(memblock.memory.cnt, INIT_MEMBLOCK_REGIONS + 2); in memblock_add_many_check()
497 ASSERT_EQ(memblock.memory.total_size, INIT_MEMBLOCK_REGIONS * size + in memblock_add_many_check()
500 ASSERT_EQ(memblock.memory.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_add_many_check()
562 ASSERT_EQ(rgn->base, r.base); in memblock_reserve_simple_check()
563 ASSERT_EQ(rgn->size, r.size); in memblock_reserve_simple_check()
603 ASSERT_EQ(rgn1->base, r1.base); in memblock_reserve_disjoint_check()
604 ASSERT_EQ(rgn1->size, r1.size); in memblock_reserve_disjoint_check()
606 ASSERT_EQ(rgn2->base, r2.base); in memblock_reserve_disjoint_check()
607 ASSERT_EQ(rgn2->size, r2.size); in memblock_reserve_disjoint_check()
609 ASSERT_EQ(memblock.reserved.cnt, 2); in memblock_reserve_disjoint_check()
610 ASSERT_EQ(memblock.reserved.total_size, r1.size + r2.size); in memblock_reserve_disjoint_check()
659 ASSERT_EQ(rgn->base, r2.base); in memblock_reserve_overlap_top_check()
660 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_overlap_top_check()
662 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_reserve_overlap_top_check()
663 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_reserve_overlap_top_check()
712 ASSERT_EQ(rgn->base, r1.base); in memblock_reserve_overlap_bottom_check()
713 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_overlap_bottom_check()
715 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_reserve_overlap_bottom_check()
716 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_reserve_overlap_bottom_check()
761 ASSERT_EQ(rgn->base, r1.base); in memblock_reserve_within_check()
762 ASSERT_EQ(rgn->size, r1.size); in memblock_reserve_within_check()
764 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_reserve_within_check()
765 ASSERT_EQ(memblock.reserved.total_size, r1.size); in memblock_reserve_within_check()
791 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_reserve_twice_check()
792 ASSERT_EQ(memblock.reserved.total_size, r.size); in memblock_reserve_twice_check()
840 ASSERT_EQ(rgn->base, r1.base); in memblock_reserve_between_check()
841 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_between_check()
843 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_reserve_between_check()
844 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_reserve_between_check()
884 ASSERT_EQ(rgn->base, r.base); in memblock_reserve_near_max_check()
885 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_near_max_check()
887 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_reserve_near_max_check()
888 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_reserve_near_max_check()
925 ASSERT_EQ(memblock.reserved.cnt, i + 1); in memblock_reserve_many_check()
926 ASSERT_EQ(memblock.reserved.total_size, (i + 1) * MEM_SIZE); in memblock_reserve_many_check()
950 ASSERT_EQ(memblock.reserved.cnt, INIT_MEMBLOCK_REGIONS + 2); in memblock_reserve_many_check()
951 ASSERT_EQ(memblock.reserved.total_size, (INIT_MEMBLOCK_REGIONS + 1) * MEM_SIZE + in memblock_reserve_many_check()
953 ASSERT_EQ(memblock.reserved.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_reserve_many_check()
960 ASSERT_EQ(memblock.reserved.regions[0].base, r.base); in memblock_reserve_many_check()
961 ASSERT_EQ(memblock.reserved.regions[0].size, r.size); in memblock_reserve_many_check()
963 ASSERT_EQ(memblock.reserved.cnt, INIT_MEMBLOCK_REGIONS + 3); in memblock_reserve_many_check()
964 ASSERT_EQ(memblock.reserved.total_size, (INIT_MEMBLOCK_REGIONS + 1) * MEM_SIZE + in memblock_reserve_many_check()
967 ASSERT_EQ(memblock.reserved.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_reserve_many_check()
1029 ASSERT_EQ(memblock.reserved.cnt, i + 1); in memblock_reserve_all_locations_check()
1030 ASSERT_EQ(memblock.reserved.total_size, (i + 1) * MEM_SIZE); in memblock_reserve_all_locations_check()
1032 ASSERT_EQ(memblock.reserved.cnt, i); in memblock_reserve_all_locations_check()
1033 ASSERT_EQ(memblock.reserved.total_size, i * MEM_SIZE); in memblock_reserve_all_locations_check()
1055 ASSERT_EQ(memblock.reserved.cnt, INIT_MEMBLOCK_REGIONS + 2); in memblock_reserve_all_locations_check()
1056 ASSERT_EQ(memblock.reserved.total_size, (INIT_MEMBLOCK_REGIONS + 1) * MEM_SIZE + in memblock_reserve_all_locations_check()
1058 ASSERT_EQ(memblock.reserved.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_reserve_all_locations_check()
1065 ASSERT_EQ(memblock.reserved.regions[0].base, r.base); in memblock_reserve_all_locations_check()
1066 ASSERT_EQ(memblock.reserved.regions[0].size, r.size); in memblock_reserve_all_locations_check()
1068 ASSERT_EQ(memblock.reserved.cnt, INIT_MEMBLOCK_REGIONS + 3); in memblock_reserve_all_locations_check()
1069 ASSERT_EQ(memblock.reserved.total_size, (INIT_MEMBLOCK_REGIONS + 1) * MEM_SIZE + in memblock_reserve_all_locations_check()
1072 ASSERT_EQ(memblock.reserved.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_reserve_all_locations_check()
1170 ASSERT_EQ(memblock.reserved.cnt, i); in memblock_reserve_many_may_conflict_check()
1171 ASSERT_EQ(memblock.reserved.total_size, i * MEM_SIZE); in memblock_reserve_many_may_conflict_check()
1173 ASSERT_EQ(memblock.reserved.cnt, i - 1); in memblock_reserve_many_may_conflict_check()
1174 ASSERT_EQ(memblock.reserved.total_size, (i - 1) * MEM_SIZE); in memblock_reserve_many_may_conflict_check()
1196 ASSERT_EQ(memblock.reserved.cnt, INIT_MEMBLOCK_REGIONS + 2); in memblock_reserve_many_may_conflict_check()
1197 ASSERT_EQ(memblock.reserved.total_size, (INIT_MEMBLOCK_REGIONS + 1) * MEM_SIZE + in memblock_reserve_many_may_conflict_check()
1199 ASSERT_EQ(memblock.reserved.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_reserve_many_may_conflict_check()
1206 ASSERT_EQ(memblock.reserved.regions[0].base + memblock.reserved.regions[0].size, in memblock_reserve_many_may_conflict_check()
1208 ASSERT_EQ(memblock.reserved.regions[0].size, new_reserved_regions_size); in memblock_reserve_many_may_conflict_check()
1215 ASSERT_EQ(memblock.reserved.regions[0].base, r.base); in memblock_reserve_many_may_conflict_check()
1216 ASSERT_EQ(memblock.reserved.regions[0].size, r.size); in memblock_reserve_many_may_conflict_check()
1218 ASSERT_EQ(memblock.reserved.cnt, INIT_MEMBLOCK_REGIONS + 3); in memblock_reserve_many_may_conflict_check()
1219 ASSERT_EQ(memblock.reserved.total_size, (INIT_MEMBLOCK_REGIONS + 1) * MEM_SIZE + in memblock_reserve_many_may_conflict_check()
1222 ASSERT_EQ(memblock.reserved.max, INIT_MEMBLOCK_REGIONS * 2); in memblock_reserve_many_may_conflict_check()
1302 ASSERT_EQ(rgn->base, r2.base); in memblock_remove_simple_check()
1303 ASSERT_EQ(rgn->size, r2.size); in memblock_remove_simple_check()
1305 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_remove_simple_check()
1306 ASSERT_EQ(memblock.memory.total_size, r2.size); in memblock_remove_simple_check()
1350 ASSERT_EQ(rgn->base, r1.base); in memblock_remove_absent_check()
1351 ASSERT_EQ(rgn->size, r1.size); in memblock_remove_absent_check()
1353 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_remove_absent_check()
1354 ASSERT_EQ(memblock.memory.total_size, r1.size); in memblock_remove_absent_check()
1406 ASSERT_EQ(rgn->base, r1.base + r2.base); in memblock_remove_overlap_top_check()
1407 ASSERT_EQ(rgn->size, total_size); in memblock_remove_overlap_top_check()
1409 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_remove_overlap_top_check()
1410 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_remove_overlap_top_check()
1458 ASSERT_EQ(rgn->base, r1.base); in memblock_remove_overlap_bottom_check()
1459 ASSERT_EQ(rgn->size, total_size); in memblock_remove_overlap_bottom_check()
1461 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_remove_overlap_bottom_check()
1462 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_remove_overlap_bottom_check()
1515 ASSERT_EQ(rgn1->base, r1.base); in memblock_remove_within_check()
1516 ASSERT_EQ(rgn1->size, r1_size); in memblock_remove_within_check()
1518 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_remove_within_check()
1519 ASSERT_EQ(rgn2->size, r2_size); in memblock_remove_within_check()
1521 ASSERT_EQ(memblock.memory.cnt, 2); in memblock_remove_within_check()
1522 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_remove_within_check()
1553 ASSERT_EQ(rgn->base, 0); in memblock_remove_only_region_check()
1554 ASSERT_EQ(rgn->size, 0); in memblock_remove_only_region_check()
1556 ASSERT_EQ(memblock.memory.cnt, 0); in memblock_remove_only_region_check()
1557 ASSERT_EQ(memblock.memory.total_size, 0); in memblock_remove_only_region_check()
1604 ASSERT_EQ(rgn->base, r1.base); in memblock_remove_near_max_check()
1605 ASSERT_EQ(rgn->size, total_size); in memblock_remove_near_max_check()
1607 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_remove_near_max_check()
1608 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_remove_near_max_check()
1664 ASSERT_EQ(rgn1->base, r1.base); in memblock_remove_overlap_two_check()
1665 ASSERT_EQ(rgn1->size, new_r1_size); in memblock_remove_overlap_two_check()
1667 ASSERT_EQ(rgn2->base, r3_end); in memblock_remove_overlap_two_check()
1668 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_remove_overlap_two_check()
1670 ASSERT_EQ(memblock.memory.cnt, 2); in memblock_remove_overlap_two_check()
1671 ASSERT_EQ(memblock.memory.total_size, total_size); in memblock_remove_overlap_two_check()
1735 ASSERT_EQ(rgn->base, r2.base); in memblock_free_simple_check()
1736 ASSERT_EQ(rgn->size, r2.size); in memblock_free_simple_check()
1738 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_free_simple_check()
1739 ASSERT_EQ(memblock.reserved.total_size, r2.size); in memblock_free_simple_check()
1783 ASSERT_EQ(rgn->base, r1.base); in memblock_free_absent_check()
1784 ASSERT_EQ(rgn->size, r1.size); in memblock_free_absent_check()
1786 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_free_absent_check()
1787 ASSERT_EQ(memblock.reserved.total_size, r1.size); in memblock_free_absent_check()
1837 ASSERT_EQ(rgn->base, r2.base + r2.size); in memblock_free_overlap_top_check()
1838 ASSERT_EQ(rgn->size, total_size); in memblock_free_overlap_top_check()
1840 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_free_overlap_top_check()
1841 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_free_overlap_top_check()
1886 ASSERT_EQ(rgn->base, r1.base); in memblock_free_overlap_bottom_check()
1887 ASSERT_EQ(rgn->size, total_size); in memblock_free_overlap_bottom_check()
1889 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_free_overlap_bottom_check()
1890 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_free_overlap_bottom_check()
1943 ASSERT_EQ(rgn1->base, r1.base); in memblock_free_within_check()
1944 ASSERT_EQ(rgn1->size, r1_size); in memblock_free_within_check()
1946 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_free_within_check()
1947 ASSERT_EQ(rgn2->size, r2_size); in memblock_free_within_check()
1949 ASSERT_EQ(memblock.reserved.cnt, 2); in memblock_free_within_check()
1950 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_free_within_check()
1981 ASSERT_EQ(rgn->base, 0); in memblock_free_only_region_check()
1982 ASSERT_EQ(rgn->size, 0); in memblock_free_only_region_check()
1984 ASSERT_EQ(memblock.reserved.cnt, 0); in memblock_free_only_region_check()
1985 ASSERT_EQ(memblock.reserved.total_size, 0); in memblock_free_only_region_check()
2031 ASSERT_EQ(rgn->base, r1.base); in memblock_free_near_max_check()
2032 ASSERT_EQ(rgn->size, total_size); in memblock_free_near_max_check()
2034 ASSERT_EQ(memblock.reserved.cnt, 1); in memblock_free_near_max_check()
2035 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_free_near_max_check()
2091 ASSERT_EQ(rgn1->base, r1.base); in memblock_free_overlap_two_check()
2092 ASSERT_EQ(rgn1->size, new_r1_size); in memblock_free_overlap_two_check()
2094 ASSERT_EQ(rgn2->base, r3_end); in memblock_free_overlap_two_check()
2095 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_free_overlap_two_check()
2097 ASSERT_EQ(memblock.reserved.cnt, 2); in memblock_free_overlap_two_check()
2098 ASSERT_EQ(memblock.reserved.total_size, total_size); in memblock_free_overlap_two_check()
2130 ASSERT_EQ(memblock.bottom_up, false); in memblock_set_bottom_up_check()
2132 ASSERT_EQ(memblock.bottom_up, true); in memblock_set_bottom_up_check()
2145 ASSERT_EQ(memblock_bottom_up(), memblock.bottom_up); in memblock_bottom_up_check()
2146 ASSERT_EQ(memblock_bottom_up(), false); in memblock_bottom_up_check()
2148 ASSERT_EQ(memblock_bottom_up(), memblock.bottom_up); in memblock_bottom_up_check()
2149 ASSERT_EQ(memblock_bottom_up(), true); in memblock_bottom_up_check()
2192 ASSERT_EQ(rgn->base, r.base); in memblock_trim_memory_aligned_check()
2193 ASSERT_EQ(rgn->size, r.size); in memblock_trim_memory_aligned_check()
2195 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_trim_memory_aligned_check()
2243 ASSERT_EQ(rgn->base, r1.base); in memblock_trim_memory_too_small_check()
2244 ASSERT_EQ(rgn->size, r1.size); in memblock_trim_memory_too_small_check()
2246 ASSERT_EQ(memblock.memory.cnt, 1); in memblock_trim_memory_too_small_check()
2301 ASSERT_EQ(rgn1->base, r1.base); in memblock_trim_memory_unaligned_base_check()
2302 ASSERT_EQ(rgn1->size, r1.size); in memblock_trim_memory_unaligned_base_check()
2304 ASSERT_EQ(rgn2->base, new_r2_base); in memblock_trim_memory_unaligned_base_check()
2305 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_trim_memory_unaligned_base_check()
2307 ASSERT_EQ(memblock.memory.cnt, 2); in memblock_trim_memory_unaligned_base_check()
2361 ASSERT_EQ(rgn1->base, r1.base); in memblock_trim_memory_unaligned_end_check()
2362 ASSERT_EQ(rgn1->size, r1.size); in memblock_trim_memory_unaligned_end_check()
2364 ASSERT_EQ(rgn2->base, r2.base); in memblock_trim_memory_unaligned_end_check()
2365 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_trim_memory_unaligned_end_check()
2367 ASSERT_EQ(memblock.memory.cnt, 2); in memblock_trim_memory_unaligned_end_check()