Lines Matching refs:assert

127 	assert(start % PAGE_SIZE == 0);  in assert_hole_checker_and_entry()
128 assert(size % PAGE_SIZE == 0); in assert_hole_checker_and_entry()
129 assert(checker->kind == Hole); in assert_hole_checker_and_entry()
130 assert(checker->address == start); in assert_hole_checker_and_entry()
131 assert(checker->size == size); in assert_hole_checker_and_entry()
133 assert(is_hole(start, size, checker->submap_depth)); in assert_hole_checker_and_entry()
146 assert(start % PAGE_SIZE == 0); in assert_allocation_checker()
147 assert(size % PAGE_SIZE == 0); in assert_allocation_checker()
148 assert(checker->kind == Allocation); in assert_allocation_checker()
149 assert(checker->address == start); in assert_allocation_checker()
150 assert(checker->size == size); in assert_allocation_checker()
167 assert(get_info_for_address(&entry_start, &entry_size, out_info, submap_depth)); in assert_allocation_entry()
168 assert(entry_start == start); in assert_allocation_entry()
169 assert(entry_size == size); in assert_allocation_entry()
199 assert(checker_range_count(checker_list->entries) == strlen(pattern)); in assert_allocation_and_hole_pattern()
228 assert(checker->protection == protection); in assert_checker_and_entry_protection_equals()
229 assert(checker->max_protection == max_protection); in assert_checker_and_entry_protection_equals()
230 assert(info->protection == protection); in assert_checker_and_entry_protection_equals()
231 assert(info->max_protection == max_protection); in assert_checker_and_entry_protection_equals()
245 assert(start % PAGE_SIZE == 0); in destructively_assert_permanent_checker_and_entry()
246 assert(size % PAGE_SIZE == 0); in destructively_assert_permanent_checker_and_entry()
247 assert(checker->permanent == true); in destructively_assert_permanent_checker_and_entry()
248 assert(checker->address == start); in destructively_assert_permanent_checker_and_entry()
249 assert(checker->size == size); in destructively_assert_permanent_checker_and_entry()
257 assert(is_entry(start, size, checker->submap_depth)); in destructively_assert_permanent_checker_and_entry()
261 assert(kr == 0); in destructively_assert_permanent_checker_and_entry()
264 assert(is_entry(start, size, checker->submap_depth)); in destructively_assert_permanent_checker_and_entry()
283 assert(start % PAGE_SIZE == 0); in destructively_assert_nonpermanent_checker_and_entry()
284 assert(size % PAGE_SIZE == 0); in destructively_assert_nonpermanent_checker_and_entry()
285 assert(checker->permanent == false); in destructively_assert_nonpermanent_checker_and_entry()
286 assert(checker->address == start); in destructively_assert_nonpermanent_checker_and_entry()
287 assert(checker->size == size); in destructively_assert_nonpermanent_checker_and_entry()
295 assert(is_entry(start, size, checker->submap_depth)); in destructively_assert_nonpermanent_checker_and_entry()
299 assert(kr == 0); in destructively_assert_nonpermanent_checker_and_entry()
302 assert(!is_entry(start, size, checker->submap_depth)); in destructively_assert_nonpermanent_checker_and_entry()
303 assert(is_hole(start, size, 0 /* submap_depth */)); in destructively_assert_nonpermanent_checker_and_entry()
334 assert(start % PAGE_SIZE == 0); in assert_submap_checker_and_entry()
335 assert(size % PAGE_SIZE == 0); in assert_submap_checker_and_entry()
336 assert(checker->kind == Submap); in assert_submap_checker_and_entry()
337 assert(checker->address == start); in assert_submap_checker_and_entry()
338 assert(checker->size == size); in assert_submap_checker_and_entry()
339 assert(checker->submap_depth == 0); /* nested submaps not allowed */ in assert_submap_checker_and_entry()
343 assert(get_info_for_address(&entry_start, &entry_size, out_info, checker->submap_depth)); in assert_submap_checker_and_entry()
344 assert(entry_start == start); in assert_submap_checker_and_entry()
345 assert(entry_size == size); in assert_submap_checker_and_entry()
373 assert(size == DEFAULT_ENTRY_SIZE - DEFAULT_PARTIAL_ENTRY_SIZE); in test_single_entry_2()
390 assert(size == DEFAULT_ENTRY_SIZE - DEFAULT_PARTIAL_ENTRY_SIZE); in test_single_entry_3()
407 assert(size == DEFAULT_ENTRY_SIZE - DEFAULT_PARTIAL_ENTRY_SIZE); in test_single_entry_4()
422 assert(start == checker_range_start_address(checker_list->entries)); in test_multiple_entries_1()
423 assert(size == DEFAULT_ENTRY_SIZE * 2); in test_multiple_entries_1()
434 assert(start == checker_range_start_address(checker_list->entries)); in test_multiple_entries_2()
435 assert(size == DEFAULT_ENTRY_SIZE * 3); in test_multiple_entries_2()
450 assert(start == checker_range_start_address(checker_list->entries)); in test_multiple_entries_3()
451 assert(size == DEFAULT_ENTRY_SIZE * 4 * 12); in test_multiple_entries_3()
462 assert(start == checker_range_start_address(checker_list->entries)); in test_multiple_entries_4()
463 assert(size == DEFAULT_ENTRY_SIZE * 3 - DEFAULT_PARTIAL_ENTRY_SIZE); in test_multiple_entries_4()
474 assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_PARTIAL_ENTRY_SIZE); in test_multiple_entries_5()
475 assert(size == DEFAULT_ENTRY_SIZE * 3 - DEFAULT_PARTIAL_ENTRY_SIZE); in test_multiple_entries_5()
486assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_PARTIAL_ENTRY_SIZE / … in test_multiple_entries_6()
487 assert(size == DEFAULT_ENTRY_SIZE * 3 - DEFAULT_PARTIAL_ENTRY_SIZE); in test_multiple_entries_6()
499 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_1()
500 assert(size == DEFAULT_ENTRY_SIZE * 2); in test_some_holes_1()
511 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_2()
512 assert(size == DEFAULT_ENTRY_SIZE * 4); in test_some_holes_2()
523 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_3()
524 assert(size == DEFAULT_ENTRY_SIZE * 2 - DEFAULT_PARTIAL_ENTRY_SIZE); in test_some_holes_3()
535 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_4()
536 assert(size == DEFAULT_ENTRY_SIZE * 4 - DEFAULT_PARTIAL_ENTRY_SIZE); in test_some_holes_4()
547 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_5()
548 assert(size == DEFAULT_ENTRY_SIZE * 2); in test_some_holes_5()
559 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_6()
560 assert(size == DEFAULT_ENTRY_SIZE * 4); in test_some_holes_6()
571 assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_PARTIAL_ENTRY_SIZE); in test_some_holes_7()
572 assert(size == DEFAULT_ENTRY_SIZE * 2 - DEFAULT_PARTIAL_ENTRY_SIZE); in test_some_holes_7()
583 assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_PARTIAL_ENTRY_SIZE); in test_some_holes_8()
584 assert(size == DEFAULT_ENTRY_SIZE * 4 - DEFAULT_PARTIAL_ENTRY_SIZE); in test_some_holes_8()
595 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_9()
596 assert(size == DEFAULT_ENTRY_SIZE * 3); in test_some_holes_9()
607 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_10()
608 assert(size == DEFAULT_ENTRY_SIZE * 5); in test_some_holes_10()
619 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_11()
620 assert(size == DEFAULT_ENTRY_SIZE * 8); in test_some_holes_11()
631 assert(start == checker_range_start_address(checker_list->entries)); in test_some_holes_12()
632 assert(size == DEFAULT_ENTRY_SIZE * 11); in test_some_holes_12()
644 assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_ENTRY_SIZE); in test_all_holes_1()
645 assert(size == DEFAULT_ENTRY_SIZE); in test_all_holes_1()
656 assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_ENTRY_SIZE); in test_all_holes_2()
657 assert(size == DEFAULT_PARTIAL_ENTRY_SIZE); in test_all_holes_2()
668 assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_PARTIAL_ENTRY_SIZE); in test_all_holes_3()
669 assert(size == DEFAULT_PARTIAL_ENTRY_SIZE); in test_all_holes_3()
680assert(start == checker_range_start_address(checker_list->entries) + DEFAULT_PARTIAL_ENTRY_SIZE / … in test_all_holes_4()
681 assert(size == DEFAULT_PARTIAL_ENTRY_SIZE); in test_all_holes_4()
697 assert(info.object_id_full == 0); in test_null_entry()
698 assert(checker->object->object_id == 0); in test_null_entry()
714 assert(info.object_id_full != 0); in test_nonresident_entry()
715 assert(info.pages_resident == 0); in test_nonresident_entry()
717 assert(checker->object->object_id != 0); in test_nonresident_entry()
718 assert(checker->pages_resident == 0); in test_nonresident_entry()
734 assert(info.pages_resident == size / PAGE_SIZE); in test_resident_entry()
735 assert(checker->pages_resident == size / PAGE_SIZE); in test_resident_entry()
736 assert(checker->object->object_id != 0); in test_resident_entry()
758 assert(left_checker); in test_one_shared_pair()
759 assert(right_checker); in test_one_shared_pair()
765 assert(left_info.object_id_full != 0); in test_one_shared_pair()
766 assert(left_info.object_id_full == right_info.object_id_full); in test_one_shared_pair()
767 assert(left_info.ref_count == 2); in test_one_shared_pair()
768 assert(right_info.ref_count == 2); in test_one_shared_pair()
769 assert(left_info.share_mode == SM_TRUESHARED); in test_one_shared_pair()
770 assert(right_info.share_mode == SM_TRUESHARED); in test_one_shared_pair()
771 assert(left_info.offset == 0); in test_one_shared_pair()
772 assert(right_info.offset == right_object_offset); in test_one_shared_pair()
773 assert(left_info.user_tag != right_info.user_tag); in test_one_shared_pair()
775 assert(left_checker->object == right_checker->object); in test_one_shared_pair()
777 assert(checker_share_mode(left_checker) == SM_SHARED); in test_one_shared_pair()
778 assert(checker_share_mode(right_checker) == SM_SHARED); in test_one_shared_pair()
779 assert(left_checker->object_offset == 0); in test_one_shared_pair()
780 assert(right_checker->object_offset == right_object_offset); in test_one_shared_pair()
781 assert(left_checker->user_tag != right_checker->user_tag); in test_one_shared_pair()
853 assert(checker_range_count(limit) == 1000); in test_shared_entry_x1000()
857 assert(checker->object); in test_shared_entry_x1000()
858 assert(checker->object->object_id_mode == object_has_known_id); in test_shared_entry_x1000()
860 assert(checker->object->object_id != 0); in test_shared_entry_x1000()
863 assert(checker->object->object_id == shared_object_id); in test_shared_entry_x1000()
864 assert(get_object_id_for_address(checker->address) == shared_object_id); in test_shared_entry_x1000()
890 assert(left_info.object_id_full != 0); in test_cow_entry()
891 assert(left_info.object_id_full == right_info.object_id_full); in test_cow_entry()
892 assert(left_info.ref_count == 2); in test_cow_entry()
893 assert(right_info.ref_count == 2); in test_cow_entry()
894 assert(left_info.share_mode == SM_COW); in test_cow_entry()
895 assert(right_info.share_mode == SM_COW); in test_cow_entry()
896 assert(left_info.offset == 0); in test_cow_entry()
897 assert(right_info.offset == 0); in test_cow_entry()
899 assert(left_checker->object == right_checker->object); in test_cow_entry()
900 assert(checker_share_mode(left_checker) == SM_COW); in test_cow_entry()
901 assert(checker_share_mode(right_checker) == SM_COW); in test_cow_entry()
902 assert(left_checker->object_offset == 0); in test_cow_entry()
903 assert(right_checker->object_offset == 0); in test_cow_entry()
921 assert(info.share_mode == SM_COW); in test_cow_unreferenced()
922 assert(info.object_id_full != 0); in test_cow_unreferenced()
923 assert(info.ref_count == 1); in test_cow_unreferenced()
924 assert(info.offset == 0); in test_cow_unreferenced()
926 assert(checker->object_offset == 0); in test_cow_unreferenced()
927 assert(checker_share_mode(checker) == SM_COW); in test_cow_unreferenced()
928 assert(checker->object); in test_cow_unreferenced()
929 assert(checker->object->self_ref_count == 1); in test_cow_unreferenced()
948 assert(cow_info.share_mode == SM_COW); in test_cow_nocow_common()
949 assert(plain_info.share_mode == SM_PRIVATE); in test_cow_nocow_common()
950 assert(cow_info.object_id_full != 0); in test_cow_nocow_common()
951 assert(cow_info.object_id_full != plain_info.object_id_full); in test_cow_nocow_common()
952 assert(cow_info.ref_count == 2); in test_cow_nocow_common()
953 assert(cow_info.offset == 0); in test_cow_nocow_common()
955 assert(checker_share_mode(cow_checker) == SM_COW); in test_cow_nocow_common()
956 assert(checker_share_mode(plain_checker) == SM_PRIVATE); in test_cow_nocow_common()
957 assert(cow_checker->object != NULL); in test_cow_nocow_common()
958 assert(cow_checker->object != plain_checker->object); in test_cow_nocow_common()
959 assert(cow_checker->object_offset == 0); in test_cow_nocow_common()
976 assert(size % 2 == 0); in test_cow_nocow()
996 assert(size % 2 == 0); in test_nocow_cow()
1017 assert(info.share_mode == SM_COW); in test_cow_unreadable()
1018 assert(info.protection == VM_PROT_NONE); in test_cow_unreadable()
1019 assert(info.ref_count == 2); in test_cow_unreadable()
1021 assert(checker_share_mode(checker) == SM_COW); in test_cow_unreadable()
1022 assert(checker->protection == VM_PROT_NONE); in test_cow_unreadable()
1023 assert(checker->object != NULL); in test_cow_unreadable()
1024 assert(checker->object->self_ref_count == 2); in test_cow_unreadable()
1042 assert(info.share_mode == SM_COW); in test_cow_unwriteable()
1043 assert(info.protection == VM_PROT_READ); in test_cow_unwriteable()
1044 assert(info.ref_count == 2); in test_cow_unwriteable()
1046 assert(checker_share_mode(checker) == SM_COW); in test_cow_unwriteable()
1047 assert(checker->protection == VM_PROT_READ); in test_cow_unwriteable()
1048 assert(checker->object != NULL); in test_cow_unwriteable()
1049 assert(checker->object->self_ref_count == 2); in test_cow_unwriteable()
1253 assert(submap_parent->object_offset == parent_offset); in test_single_submap_oversize_entry_common()
1254 assert(parent_info.offset == parent_offset); in test_single_submap_oversize_entry_common()
1265 assert(submap_content->submap_depth == 1); in test_single_submap_oversize_entry_common()
1267 assert(submap_content->object_offset == 0); in test_single_submap_oversize_entry_common()
1268 assert(content_info.offset == 0); in test_single_submap_oversize_entry_common()
1532 assert(checker_range_count(checker_list->entries) == 3); in assert_submap_allocation_submap()
1538 assert(checker->object_offset == offset); in assert_submap_allocation_submap()
1539 assert(info.offset == offset); in assert_submap_allocation_submap()
1550 assert(checker->object_offset == offset); in assert_submap_allocation_submap()
1551 assert(info.offset == offset); in assert_submap_allocation_submap()
1554 assert(size == offset); in assert_submap_allocation_submap()
1570 assert(checker_range_count(submap_checkers->entries) == 1); in test_submap_allocation_submap_one_entry_common()
1573 assert(submap_content->protection == submap_protection); in test_submap_allocation_submap_one_entry_common()
1574 assert(submap_content->max_protection == submap_protection); in test_submap_allocation_submap_one_entry_common()
1612 assert(checker_range_count(submap_checkers->entries) == 2); in test_submap_allocation_submap_two_entries_common()
1616 assert(submap_content->protection == submap_protection); in test_submap_allocation_submap_two_entries_common()
1617 assert(submap_content->max_protection == submap_protection); in test_submap_allocation_submap_two_entries_common()
1621 assert(submap_content->protection == submap_protection); in test_submap_allocation_submap_two_entries_common()
1622 assert(submap_content->max_protection == submap_protection); in test_submap_allocation_submap_two_entries_common()
1660 assert(checker_range_count(submap_checkers->entries) == 3); in test_submap_allocation_submap_three_entries_common()
1664 assert(submap_content->protection == submap_protection); in test_submap_allocation_submap_three_entries_common()
1665 assert(submap_content->max_protection == submap_protection); in test_submap_allocation_submap_three_entries_common()
1669 assert(submap_content->protection == submap_protection); in test_submap_allocation_submap_three_entries_common()
1670 assert(submap_content->max_protection == submap_protection); in test_submap_allocation_submap_three_entries_common()
1674 assert(submap_content->protection == submap_protection); in test_submap_allocation_submap_three_entries_common()
1675 assert(submap_content->max_protection == submap_protection); in test_submap_allocation_submap_three_entries_common()
1711 assert(get_info_for_address(&info_address, &info_size, &info, submap_depth)); in assert_protection()
1712 assert(info_address == address); in assert_protection()