Lines Matching +full:0 +full:x7000

36 	} while (0)
193 int count = 0; in cleanup_mm()
198 vma_iter_set(vmi, 0); in cleanup_mm()
205 mm->map_count = 0; in cleanup_mm()
231 struct vm_area_struct *vma_left = alloc_vma(&mm, 0, 0x1000, 0, flags); in test_simple_merge()
232 struct vm_area_struct *vma_right = alloc_vma(&mm, 0x2000, 0x3000, 2, flags); in test_simple_merge()
233 VMA_ITERATOR(vmi, &mm, 0x1000); in test_simple_merge()
237 .start = 0x1000, in test_simple_merge()
238 .end = 0x2000, in test_simple_merge()
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()
265 struct vm_area_struct *init_vma = alloc_vma(&mm, 0, 0x3000, 0, flags); in test_simple_modify()
266 VMA_ITERATOR(vmi, &mm, 0x1000); in test_simple_modify()
275 0x1000, 0x2000, VM_READ | VM_MAYREAD); 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()
289 vma_iter_set(&vmi, 0); 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()
310 ASSERT_EQ(vma->vm_start, 0x2000); in test_simple_modify()
311 ASSERT_EQ(vma->vm_end, 0x3000); in test_simple_modify()
324 struct vm_area_struct *vma = alloc_vma(&mm, 0, 0x1000, 0, flags); in test_simple_expand()
325 VMA_ITERATOR(vmi, &mm, 0); in test_simple_expand()
329 .start = 0, in test_simple_expand()
330 .end = 0x3000, in test_simple_expand()
331 .pgoff = 0, in test_simple_expand()
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()
352 struct vm_area_struct *vma = alloc_vma(&mm, 0, 0x3000, 0, flags); in test_simple_shrink()
353 VMA_ITERATOR(vmi, &mm, 0); in test_simple_shrink()
357 ASSERT_FALSE(vma_shrink(&vmi, vma, 0, 0x1000, 0)); in test_simple_shrink()
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()
373 VMA_ITERATOR(vmi, &mm, 0); in test_merge_new()
401 vma_a = alloc_and_link_vma(&mm, 0, 0x2000, 0, flags); in test_merge_new()
407 vma_b = alloc_and_link_vma(&mm, 0x3000, 0x4000, 3, flags); in test_merge_new()
412 vma_c = alloc_and_link_vma(&mm, 0xb000, 0xc000, 0xb, flags); in test_merge_new()
423 vma_d = try_merge_new_vma(&mm, &vmg, 0x7000, 0x9000, 7, flags, &merged); in test_merge_new()
438 vma = try_merge_new_vma(&mm, &vmg, 0x2000, 0x3000, 2, flags, &merged); 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()
455 vma = try_merge_new_vma(&mm, &vmg, 0x4000, 0x5000, 4, flags, &merged); 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()
474 vma = try_merge_new_vma(&mm, &vmg, 0x6000, 0x7000, 6, flags, &merged); 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()
492 vma = try_merge_new_vma(&mm, &vmg, 0x5000, 0x6000, 5, flags, &merged); 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()
510 vma = try_merge_new_vma(&mm, &vmg, 0xa000, 0xb000, 0xa, flags, &merged); 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()
527 vma = try_merge_new_vma(&mm, &vmg, 0x9000, 0xa000, 0x9, flags, &merged); 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()
545 count = 0; in test_merge_new()
546 vma_iter_set(&vmi, 0); 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()
569 VMA_ITERATOR(vmi, &mm, 0); in test_vma_merge_special_flags()
575 vm_flags_t all_special_flags = 0; in test_vma_merge_special_flags()
580 for (i = 0; i < ARRAY_SIZE(special_flags); i++) { in test_vma_merge_special_flags()
589 vma_left = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_vma_merge_special_flags()
600 vmg_set_range(&vmg, 0x3000, 0x4000, 3, flags); in test_vma_merge_special_flags()
601 for (i = 0; i < ARRAY_SIZE(special_flags); i++) { in test_vma_merge_special_flags()
619 vma = alloc_and_link_vma(&mm, 0x3000, 0x4000, 3, flags); in test_vma_merge_special_flags()
623 for (i = 0; i < ARRAY_SIZE(special_flags); i++) { in test_vma_merge_special_flags()
641 VMA_ITERATOR(vmi, &mm, 0); in test_vma_merge_with_close()
719 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_vma_merge_with_close()
720 vma_next = alloc_and_link_vma(&mm, 0x5000, 0x9000, 5, flags); in test_vma_merge_with_close()
723 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); 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()
744 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_vma_merge_with_close()
745 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_vma_merge_with_close()
748 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); in test_vma_merge_with_close()
772 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_vma_merge_with_close()
773 vma_next = alloc_and_link_vma(&mm, 0x5000, 0x9000, 5, flags); in test_vma_merge_with_close()
776 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); in test_vma_merge_with_close()
800 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_vma_merge_with_close()
801 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_vma_merge_with_close()
802 vma_next = alloc_and_link_vma(&mm, 0x5000, 0x9000, 5, flags); in test_vma_merge_with_close()
805 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); in test_vma_merge_with_close()
826 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_vma_merge_with_close()
827 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_vma_merge_with_close()
828 vma_next = alloc_and_link_vma(&mm, 0x5000, 0x9000, 5, flags); in test_vma_merge_with_close()
831 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); 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()
850 VMA_ITERATOR(vmi, &mm, 0); in test_vma_merge_new_with_close()
855 struct vm_area_struct *vma_prev = alloc_and_link_vma(&mm, 0, 0x2000, 0, flags); in test_vma_merge_new_with_close()
856 struct vm_area_struct *vma_next = alloc_and_link_vma(&mm, 0x5000, 0x7000, 5, flags); in test_vma_merge_new_with_close()
886 vmg_set_range(&vmg, 0x2000, 0x5000, 2, flags); 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()
905 VMA_ITERATOR(vmi, &mm, 0); in test_merge_existing()
925 vma = alloc_and_link_vma(&mm, 0x2000, 0x6000, 2, flags); in test_merge_existing()
927 vma_next = alloc_and_link_vma(&mm, 0x6000, 0x9000, 6, flags); in test_merge_existing()
929 vmg_set_range(&vmg, 0x3000, 0x6000, 3, flags); 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()
939 ASSERT_EQ(vma->vm_start, 0x2000); in test_merge_existing()
940 ASSERT_EQ(vma->vm_end, 0x3000); in test_merge_existing()
959 vma = alloc_and_link_vma(&mm, 0x2000, 0x6000, 2, flags); in test_merge_existing()
960 vma_next = alloc_and_link_vma(&mm, 0x6000, 0x9000, 6, flags); in test_merge_existing()
962 vmg_set_range(&vmg, 0x2000, 0x6000, 2, flags); 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()
987 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_merge_existing()
989 vma = alloc_and_link_vma(&mm, 0x3000, 0x7000, 3, flags); in test_merge_existing()
991 vmg_set_range(&vmg, 0x3000, 0x6000, 3, flags); 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()
1002 ASSERT_EQ(vma->vm_start, 0x6000); in test_merge_existing()
1003 ASSERT_EQ(vma->vm_end, 0x7000); in test_merge_existing()
1022 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_merge_existing()
1024 vma = alloc_and_link_vma(&mm, 0x3000, 0x7000, 3, flags); in test_merge_existing()
1025 vmg_set_range(&vmg, 0x3000, 0x7000, 3, flags); 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()
1051 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_merge_existing()
1053 vma = alloc_and_link_vma(&mm, 0x3000, 0x7000, 3, flags); in test_merge_existing()
1054 vma_next = alloc_and_link_vma(&mm, 0x7000, 0x9000, 7, flags); in test_merge_existing()
1055 vmg_set_range(&vmg, 0x3000, 0x7000, 3, flags); 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()
1086 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_merge_existing()
1087 vma = alloc_and_link_vma(&mm, 0x3000, 0x8000, 3, flags); in test_merge_existing()
1088 vma_next = alloc_and_link_vma(&mm, 0x8000, 0xa000, 8, flags); in test_merge_existing()
1090 vmg_set_range(&vmg, 0x4000, 0x5000, 4, flags); in test_merge_existing()
1096 vmg_set_range(&vmg, 0x5000, 0x6000, 5, flags); in test_merge_existing()
1102 vmg_set_range(&vmg, 0x6000, 0x7000, 6, flags); in test_merge_existing()
1108 vmg_set_range(&vmg, 0x4000, 0x7000, 4, flags); in test_merge_existing()
1114 vmg_set_range(&vmg, 0x4000, 0x6000, 4, flags); in test_merge_existing()
1120 vmg_set_range(&vmg, 0x5000, 0x6000, 5, flags); in test_merge_existing()
1135 VMA_ITERATOR(vmi, &mm, 0); in test_anon_vma_non_mergeable()
1160 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_anon_vma_non_mergeable()
1161 vma = alloc_and_link_vma(&mm, 0x3000, 0x7000, 3, flags); in test_anon_vma_non_mergeable()
1162 vma_next = alloc_and_link_vma(&mm, 0x7000, 0x9000, 7, flags); in test_anon_vma_non_mergeable()
1185 vmg_set_range(&vmg, 0x3000, 0x7000, 3, flags); 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()
1211 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_anon_vma_non_mergeable()
1212 vma_next = alloc_and_link_vma(&mm, 0x7000, 0x9000, 7, flags); in test_anon_vma_non_mergeable()
1222 vmg_set_range(&vmg, 0x3000, 0x7000, 3, flags); 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()
1243 VMA_ITERATOR(vmi, &mm, 0); in test_dup_anon_vma()
1262 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_dup_anon_vma()
1263 vma_next = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_dup_anon_vma()
1266 vmg_set_range(&vmg, 0, 0x5000, 0, flags); in test_dup_anon_vma()
1270 ASSERT_EQ(expand_existing(&vmg), 0); in test_dup_anon_vma()
1288 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_dup_anon_vma()
1289 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_dup_anon_vma()
1290 vma_next = alloc_and_link_vma(&mm, 0x5000, 0x8000, 5, flags); in test_dup_anon_vma()
1297 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); 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()
1321 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_dup_anon_vma()
1322 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_dup_anon_vma()
1323 vma_next = alloc_and_link_vma(&mm, 0x5000, 0x8000, 5, flags); in test_dup_anon_vma()
1326 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); 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()
1350 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_dup_anon_vma()
1351 vma = alloc_and_link_vma(&mm, 0x3000, 0x8000, 3, flags); in test_dup_anon_vma()
1354 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); 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()
1378 vma = alloc_and_link_vma(&mm, 0, 0x5000, 0, flags); in test_dup_anon_vma()
1379 vma_next = alloc_and_link_vma(&mm, 0x5000, 0x8000, 5, flags); in test_dup_anon_vma()
1382 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); 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()
1403 VMA_ITERATOR(vmi, &mm, 0); in test_vmi_prealloc_fail()
1416 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_vmi_prealloc_fail()
1417 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_vmi_prealloc_fail()
1420 vmg_set_range(&vmg, 0x3000, 0x5000, 3, flags); in test_vmi_prealloc_fail()
1443 vma_prev = alloc_and_link_vma(&mm, 0, 0x3000, 0, flags); in test_vmi_prealloc_fail()
1444 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_vmi_prealloc_fail()
1447 vmg_set_range(&vmg, 0, 0x5000, 3, flags); in test_vmi_prealloc_fail()
1467 VMA_ITERATOR(vmi, &mm, 0x1000); in test_merge_extend()
1470 vma = alloc_and_link_vma(&mm, 0, 0x1000, 0, flags); in test_merge_extend()
1471 alloc_and_link_vma(&mm, 0x3000, 0x4000, 3, flags); in test_merge_extend()
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()
1498 VMA_ITERATOR(vmi, &mm, 0); in test_copy_vma()
1503 vma = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); in test_copy_vma()
1504 vma_new = copy_vma(&vma, 0, 0x2000, 0, &need_locks); in test_copy_vma()
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()
1515 vma = alloc_and_link_vma(&mm, 0, 0x2000, 0, flags); in test_copy_vma()
1516 vma_next = alloc_and_link_vma(&mm, 0x6000, 0x8000, 6, flags); in test_copy_vma()
1517 vma_new = copy_vma(&vma, 0x4000, 0x2000, 4, &need_locks); in test_copy_vma()
1529 VMA_ITERATOR(vmi, &mm, 0); in test_expand_only_mode()
1531 VMG_STATE(vmg, &mm, &vmi, 0x5000, 0x9000, flags, 5); in test_expand_only_mode()
1539 alloc_and_link_vma(&mm, 0, 0x2000, 0, flags); in test_expand_only_mode()
1543 * 0x9000. in test_expand_only_mode()
1545 vma_iter_set(&vmi, 0x3000); in test_expand_only_mode()
1546 vma_prev = alloc_and_link_vma(&mm, 0x3000, 0x5000, 3, flags); 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()
1558 ASSERT_EQ(vma_iter_addr(&vmi), 0x3000); in test_expand_only_mode()
1566 int num_tests = 0, num_fail = 0; in main()
1577 } while (0) in main()
1602 return num_fail == 0 ? EXIT_SUCCESS : EXIT_FAILURE; in main()