Lines Matching refs:ASSERT_EQ
38 #define ASSERT_EQ(_val1, _val2) ASSERT_TRUE((_val1) == (_val2)) macro
165 ASSERT_EQ(vmg->state, VMA_MERGE_SUCCESS); in try_merge_new_vma()
171 ASSERT_EQ(vmg->state, VMA_MERGE_NOMERGE); in try_merge_new_vma()
249 ASSERT_EQ(vma->vm_start, 0); in test_simple_merge()
250 ASSERT_EQ(vma->vm_end, 0x3000); in test_simple_merge()
251 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_merge()
252 ASSERT_EQ(vma->vm_flags, flags); in test_simple_merge()
278 ASSERT_EQ(vma, init_vma); in test_simple_modify()
280 ASSERT_EQ(vma->vm_start, 0x1000); in test_simple_modify()
281 ASSERT_EQ(vma->vm_end, 0x2000); in test_simple_modify()
282 ASSERT_EQ(vma->vm_pgoff, 1); in test_simple_modify()
292 ASSERT_EQ(vma->vm_start, 0); in test_simple_modify()
293 ASSERT_EQ(vma->vm_end, 0x1000); in test_simple_modify()
294 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_modify()
301 ASSERT_EQ(vma->vm_start, 0x1000); in test_simple_modify()
302 ASSERT_EQ(vma->vm_end, 0x2000); in test_simple_modify()
303 ASSERT_EQ(vma->vm_pgoff, 1); in test_simple_modify()
310 ASSERT_EQ(vma->vm_start, 0x2000); in test_simple_modify()
311 ASSERT_EQ(vma->vm_end, 0x3000); in test_simple_modify()
312 ASSERT_EQ(vma->vm_pgoff, 2); in test_simple_modify()
338 ASSERT_EQ(vma->vm_start, 0); in test_simple_expand()
339 ASSERT_EQ(vma->vm_end, 0x3000); in test_simple_expand()
340 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_expand()
359 ASSERT_EQ(vma->vm_start, 0); in test_simple_shrink()
360 ASSERT_EQ(vma->vm_end, 0x1000); in test_simple_shrink()
361 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_shrink()
428 ASSERT_EQ(mm.map_count, 4); in test_merge_new()
439 ASSERT_EQ(vma, vma_a); in test_merge_new()
442 ASSERT_EQ(vma->vm_start, 0); in test_merge_new()
443 ASSERT_EQ(vma->vm_end, 0x4000); in test_merge_new()
444 ASSERT_EQ(vma->vm_pgoff, 0); in test_merge_new()
445 ASSERT_EQ(vma->anon_vma, &dummy_anon_vma); in test_merge_new()
447 ASSERT_EQ(mm.map_count, 3); in test_merge_new()
456 ASSERT_EQ(vma, vma_a); in test_merge_new()
459 ASSERT_EQ(vma->vm_start, 0); in test_merge_new()
460 ASSERT_EQ(vma->vm_end, 0x5000); in test_merge_new()
461 ASSERT_EQ(vma->vm_pgoff, 0); in test_merge_new()
462 ASSERT_EQ(vma->anon_vma, &dummy_anon_vma); in test_merge_new()
464 ASSERT_EQ(mm.map_count, 3); in test_merge_new()
475 ASSERT_EQ(vma, vma_d); in test_merge_new()
478 ASSERT_EQ(vma->vm_start, 0x6000); in test_merge_new()
479 ASSERT_EQ(vma->vm_end, 0x9000); in test_merge_new()
480 ASSERT_EQ(vma->vm_pgoff, 6); in test_merge_new()
481 ASSERT_EQ(vma->anon_vma, &dummy_anon_vma); in test_merge_new()
483 ASSERT_EQ(mm.map_count, 3); in test_merge_new()
493 ASSERT_EQ(vma, vma_a); in test_merge_new()
496 ASSERT_EQ(vma->vm_start, 0); in test_merge_new()
497 ASSERT_EQ(vma->vm_end, 0x9000); in test_merge_new()
498 ASSERT_EQ(vma->vm_pgoff, 0); in test_merge_new()
499 ASSERT_EQ(vma->anon_vma, &dummy_anon_vma); in test_merge_new()
501 ASSERT_EQ(mm.map_count, 2); in test_merge_new()
511 ASSERT_EQ(vma, vma_c); in test_merge_new()
514 ASSERT_EQ(vma->vm_start, 0xa000); in test_merge_new()
515 ASSERT_EQ(vma->vm_end, 0xc000); in test_merge_new()
516 ASSERT_EQ(vma->vm_pgoff, 0xa); in test_merge_new()
517 ASSERT_EQ(vma->anon_vma, &dummy_anon_vma); in test_merge_new()
519 ASSERT_EQ(mm.map_count, 2); in test_merge_new()
528 ASSERT_EQ(vma, vma_a); in test_merge_new()
531 ASSERT_EQ(vma->vm_start, 0); in test_merge_new()
532 ASSERT_EQ(vma->vm_end, 0xc000); in test_merge_new()
533 ASSERT_EQ(vma->vm_pgoff, 0); in test_merge_new()
534 ASSERT_EQ(vma->anon_vma, &dummy_anon_vma); in test_merge_new()
536 ASSERT_EQ(mm.map_count, 1); in test_merge_new()
549 ASSERT_EQ(vma->vm_start, 0); in test_merge_new()
550 ASSERT_EQ(vma->vm_end, 0xc000); in test_merge_new()
551 ASSERT_EQ(vma->vm_pgoff, 0); in test_merge_new()
552 ASSERT_EQ(vma->anon_vma, &dummy_anon_vma); in test_merge_new()
559 ASSERT_EQ(count, 1); in test_merge_new()
583 ASSERT_EQ(all_special_flags, VM_SPECIAL); in test_vma_merge_special_flags()
607 ASSERT_EQ(vma, NULL); in test_vma_merge_special_flags()
608 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_vma_merge_special_flags()
629 ASSERT_EQ(vma, NULL); in test_vma_merge_special_flags()
630 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_vma_merge_special_flags()
724 ASSERT_EQ(merge_new(&vmg), vma_prev); in test_vma_merge_with_close()
725 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_vma_merge_with_close()
726 ASSERT_EQ(vma_prev->vm_start, 0); in test_vma_merge_with_close()
727 ASSERT_EQ(vma_prev->vm_end, 0x5000); in test_vma_merge_with_close()
728 ASSERT_EQ(vma_prev->vm_pgoff, 0); in test_vma_merge_with_close()
730 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_vma_merge_with_close()
756 ASSERT_EQ(merge_existing(&vmg), NULL); in test_vma_merge_with_close()
757 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_vma_merge_with_close()
759 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_vma_merge_with_close()
778 ASSERT_EQ(merge_existing(&vmg), NULL); in test_vma_merge_with_close()
784 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_vma_merge_with_close()
786 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_vma_merge_with_close()
809 ASSERT_EQ(merge_existing(&vmg), NULL); in test_vma_merge_with_close()
810 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_vma_merge_with_close()
812 ASSERT_EQ(cleanup_mm(&mm, &vmi), 3); in test_vma_merge_with_close()
835 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_vma_merge_with_close()
836 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_vma_merge_with_close()
837 ASSERT_EQ(vma_prev->vm_start, 0); in test_vma_merge_with_close()
838 ASSERT_EQ(vma_prev->vm_end, 0x5000); in test_vma_merge_with_close()
839 ASSERT_EQ(vma_prev->vm_pgoff, 0); in test_vma_merge_with_close()
841 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_vma_merge_with_close()
889 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_vma_merge_new_with_close()
890 ASSERT_EQ(vma->vm_start, 0); in test_vma_merge_new_with_close()
891 ASSERT_EQ(vma->vm_end, 0x5000); in test_vma_merge_new_with_close()
892 ASSERT_EQ(vma->vm_pgoff, 0); in test_vma_merge_new_with_close()
893 ASSERT_EQ(vma->vm_ops, &vm_ops); in test_vma_merge_new_with_close()
895 ASSERT_EQ(mm.map_count, 2); in test_vma_merge_new_with_close()
933 ASSERT_EQ(merge_existing(&vmg), vma_next); in test_merge_existing()
934 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_merge_existing()
935 ASSERT_EQ(vma_next->vm_start, 0x3000); in test_merge_existing()
936 ASSERT_EQ(vma_next->vm_end, 0x9000); in test_merge_existing()
937 ASSERT_EQ(vma_next->vm_pgoff, 3); in test_merge_existing()
938 ASSERT_EQ(vma_next->anon_vma, &dummy_anon_vma); in test_merge_existing()
939 ASSERT_EQ(vma->vm_start, 0x2000); in test_merge_existing()
940 ASSERT_EQ(vma->vm_end, 0x3000); in test_merge_existing()
941 ASSERT_EQ(vma->vm_pgoff, 2); in test_merge_existing()
944 ASSERT_EQ(mm.map_count, 2); in test_merge_existing()
947 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_merge_existing()
965 ASSERT_EQ(merge_existing(&vmg), vma_next); in test_merge_existing()
966 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_merge_existing()
967 ASSERT_EQ(vma_next->vm_start, 0x2000); in test_merge_existing()
968 ASSERT_EQ(vma_next->vm_end, 0x9000); in test_merge_existing()
969 ASSERT_EQ(vma_next->vm_pgoff, 2); in test_merge_existing()
970 ASSERT_EQ(vma_next->anon_vma, &dummy_anon_vma); in test_merge_existing()
972 ASSERT_EQ(mm.map_count, 1); in test_merge_existing()
975 ASSERT_EQ(cleanup_mm(&mm, &vmi), 1); in test_merge_existing()
996 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_merge_existing()
997 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_merge_existing()
998 ASSERT_EQ(vma_prev->vm_start, 0); in test_merge_existing()
999 ASSERT_EQ(vma_prev->vm_end, 0x6000); in test_merge_existing()
1000 ASSERT_EQ(vma_prev->vm_pgoff, 0); in test_merge_existing()
1001 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_merge_existing()
1002 ASSERT_EQ(vma->vm_start, 0x6000); in test_merge_existing()
1003 ASSERT_EQ(vma->vm_end, 0x7000); in test_merge_existing()
1004 ASSERT_EQ(vma->vm_pgoff, 6); in test_merge_existing()
1007 ASSERT_EQ(mm.map_count, 2); in test_merge_existing()
1010 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_merge_existing()
1029 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_merge_existing()
1030 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_merge_existing()
1031 ASSERT_EQ(vma_prev->vm_start, 0); in test_merge_existing()
1032 ASSERT_EQ(vma_prev->vm_end, 0x7000); in test_merge_existing()
1033 ASSERT_EQ(vma_prev->vm_pgoff, 0); in test_merge_existing()
1034 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_merge_existing()
1036 ASSERT_EQ(mm.map_count, 1); in test_merge_existing()
1039 ASSERT_EQ(cleanup_mm(&mm, &vmi), 1); in test_merge_existing()
1059 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_merge_existing()
1060 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_merge_existing()
1061 ASSERT_EQ(vma_prev->vm_start, 0); in test_merge_existing()
1062 ASSERT_EQ(vma_prev->vm_end, 0x9000); in test_merge_existing()
1063 ASSERT_EQ(vma_prev->vm_pgoff, 0); in test_merge_existing()
1064 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_merge_existing()
1066 ASSERT_EQ(mm.map_count, 1); in test_merge_existing()
1069 ASSERT_EQ(cleanup_mm(&mm, &vmi), 1); in test_merge_existing()
1093 ASSERT_EQ(merge_existing(&vmg), NULL); in test_merge_existing()
1094 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_merge_existing()
1099 ASSERT_EQ(merge_existing(&vmg), NULL); in test_merge_existing()
1100 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_merge_existing()
1105 ASSERT_EQ(merge_existing(&vmg), NULL); in test_merge_existing()
1106 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_merge_existing()
1111 ASSERT_EQ(merge_existing(&vmg), NULL); in test_merge_existing()
1112 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_merge_existing()
1117 ASSERT_EQ(merge_existing(&vmg), NULL); in test_merge_existing()
1118 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_merge_existing()
1123 ASSERT_EQ(merge_existing(&vmg), NULL); in test_merge_existing()
1124 ASSERT_EQ(vmg.state, VMA_MERGE_NOMERGE); in test_merge_existing()
1126 ASSERT_EQ(cleanup_mm(&mm, &vmi), 3); in test_merge_existing()
1189 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_anon_vma_non_mergeable()
1190 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_anon_vma_non_mergeable()
1191 ASSERT_EQ(vma_prev->vm_start, 0); in test_anon_vma_non_mergeable()
1192 ASSERT_EQ(vma_prev->vm_end, 0x7000); in test_anon_vma_non_mergeable()
1193 ASSERT_EQ(vma_prev->vm_pgoff, 0); in test_anon_vma_non_mergeable()
1198 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_anon_vma_non_mergeable()
1225 ASSERT_EQ(merge_new(&vmg), vma_prev); in test_anon_vma_non_mergeable()
1226 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_anon_vma_non_mergeable()
1227 ASSERT_EQ(vma_prev->vm_start, 0); in test_anon_vma_non_mergeable()
1228 ASSERT_EQ(vma_prev->vm_end, 0x7000); in test_anon_vma_non_mergeable()
1229 ASSERT_EQ(vma_prev->vm_pgoff, 0); in test_anon_vma_non_mergeable()
1234 ASSERT_EQ(cleanup_mm(&mm, &vmi), 2); in test_anon_vma_non_mergeable()
1270 ASSERT_EQ(expand_existing(&vmg), 0); in test_dup_anon_vma()
1273 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_dup_anon_vma()
1301 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_dup_anon_vma()
1302 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_dup_anon_vma()
1304 ASSERT_EQ(vma_prev->vm_start, 0); in test_dup_anon_vma()
1305 ASSERT_EQ(vma_prev->vm_end, 0x8000); in test_dup_anon_vma()
1307 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_dup_anon_vma()
1330 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_dup_anon_vma()
1331 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_dup_anon_vma()
1333 ASSERT_EQ(vma_prev->vm_start, 0); in test_dup_anon_vma()
1334 ASSERT_EQ(vma_prev->vm_end, 0x8000); in test_dup_anon_vma()
1336 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_dup_anon_vma()
1358 ASSERT_EQ(merge_existing(&vmg), vma_prev); in test_dup_anon_vma()
1359 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_dup_anon_vma()
1361 ASSERT_EQ(vma_prev->vm_start, 0); in test_dup_anon_vma()
1362 ASSERT_EQ(vma_prev->vm_end, 0x5000); in test_dup_anon_vma()
1364 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_dup_anon_vma()
1386 ASSERT_EQ(merge_existing(&vmg), vma_next); in test_dup_anon_vma()
1387 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_dup_anon_vma()
1389 ASSERT_EQ(vma_next->vm_start, 0x3000); in test_dup_anon_vma()
1390 ASSERT_EQ(vma_next->vm_end, 0x8000); in test_dup_anon_vma()
1392 ASSERT_EQ(vma_next->anon_vma, &dummy_anon_vma); in test_dup_anon_vma()
1427 ASSERT_EQ(merge_existing(&vmg), NULL); in test_vmi_prealloc_fail()
1428 ASSERT_EQ(vmg.state, VMA_MERGE_ERROR_NOMEM); in test_vmi_prealloc_fail()
1430 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_vmi_prealloc_fail()
1452 ASSERT_EQ(expand_existing(&vmg), -ENOMEM); in test_vmi_prealloc_fail()
1453 ASSERT_EQ(vmg.state, VMA_MERGE_ERROR_NOMEM); in test_vmi_prealloc_fail()
1455 ASSERT_EQ(vma_prev->anon_vma, &dummy_anon_vma); in test_vmi_prealloc_fail()
1482 ASSERT_EQ(vma_merge_extend(&vmi, vma, 0x2000), vma); in test_merge_extend()
1483 ASSERT_EQ(vma->vm_start, 0); in test_merge_extend()
1484 ASSERT_EQ(vma->vm_end, 0x4000); in test_merge_extend()
1485 ASSERT_EQ(vma->vm_pgoff, 0); in test_merge_extend()
1487 ASSERT_EQ(mm.map_count, 1); in test_merge_extend()
1507 ASSERT_EQ(vma_new->vm_start, 0); in test_copy_vma()
1508 ASSERT_EQ(vma_new->vm_end, 0x2000); in test_copy_vma()
1509 ASSERT_EQ(vma_new->vm_pgoff, 0); in test_copy_vma()
1519 ASSERT_EQ(vma_new, vma_next); in test_copy_vma()
1552 ASSERT_EQ(vma, vma_prev); in test_expand_only_mode()
1553 ASSERT_EQ(vmg.state, VMA_MERGE_SUCCESS); in test_expand_only_mode()
1554 ASSERT_EQ(vma->vm_start, 0x3000); in test_expand_only_mode()
1555 ASSERT_EQ(vma->vm_end, 0x9000); in test_expand_only_mode()
1556 ASSERT_EQ(vma->vm_pgoff, 3); in test_expand_only_mode()
1558 ASSERT_EQ(vma_iter_addr(&vmi), 0x3000); in test_expand_only_mode()