Home
last modified time | relevance | path

Searched refs:MAP_FAILED (Results 1 – 25 of 192) sorted by relevance

12345678

/linux-6.12.1/tools/testing/selftests/mm/
Dmremap_dontunmap.c48 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in kernel_support_for_mremap_dontunmap()
55 if (dest_mapping == MAP_FAILED) { in kernel_support_for_mremap_dontunmap()
102 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple()
110 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple()
142 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple_shmem()
152 if (dest_mapping == MAP_FAILED && errno == EINVAL) { in mremap_dontunmap_simple_shmem()
159 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple_shmem()
192 BUG_ON(dest_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple_fixed()
198 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple_fixed()
205 BUG_ON(remapped_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple_fixed()
[all …]
Dmap_fixed_noreplace.c32 if (addr == MAP_FAILED) in find_base_addr()
62 if (p == MAP_FAILED) { in main()
76 if (p == MAP_FAILED) { in main()
94 if (p != MAP_FAILED) { in main()
113 if (p != MAP_FAILED) { in main()
131 if (p != MAP_FAILED) { in main()
149 if (p != MAP_FAILED) { in main()
167 if (p == MAP_FAILED) { in main()
185 if (p == MAP_FAILED) { in main()
Dmkdirty.c69 if (mmap_mem == MAP_FAILED) { in mmap_thp_range()
71 return MAP_FAILED; in mmap_thp_range()
78 return MAP_FAILED; in mmap_thp_range()
95 if (mem == MAP_FAILED) { in test_ptrace_write()
132 if (mem == MAP_FAILED) in test_ptrace_write_thp()
166 if (mem == MAP_FAILED) { in test_page_migration()
198 if (mem == MAP_FAILED) in test_page_migration_thp()
237 if (mem == MAP_FAILED) in test_pte_mapped_thp()
281 if (dst == MAP_FAILED) { in test_uffdio_copy()
Dhugepage-mremap.c86 if (addr == MAP_FAILED) in register_region_with_uffd()
128 if (haddr == MAP_FAILED) in main()
136 if (daddr == MAP_FAILED) in main()
143 if (vaddr == MAP_FAILED) in main()
150 if (addr == MAP_FAILED) in main()
161 if (addr != MAP_FAILED) in main()
Dmdwe_test.c213 if (self->p && self->p != MAP_FAILED) in FIXTURE_TEARDOWN()
220 EXPECT_NE(self->p, MAP_FAILED); in TEST_F()
227 EXPECT_EQ(self->p, MAP_FAILED); in TEST_F()
229 EXPECT_NE(self->p, MAP_FAILED); in TEST_F()
238 ASSERT_NE(self->p, MAP_FAILED); in TEST_F()
249 ASSERT_NE(self->p, MAP_FAILED); in TEST_F()
264 ASSERT_NE(self->p, MAP_FAILED); in TEST_F()
279 ASSERT_NE(self->p, MAP_FAILED); in TEST_F()
297 ASSERT_NE(self->p, MAP_FAILED); in TEST_F()
Dhugetlb-madvise.c101 if (addr == MAP_FAILED) { in main()
143 if (addr == MAP_FAILED) { in main()
181 if (addr == MAP_FAILED) { in main()
210 if (addr == MAP_FAILED) { in main()
269 if (addr == MAP_FAILED) { in main()
309 if (addr == MAP_FAILED) { in main()
321 if (addr2 == MAP_FAILED) { in main()
Dcow.c748 if (mem == MAP_FAILED) { in do_run_with_base_page()
801 char *mem, *mmap_mem, *tmp, *mremap_mem = MAP_FAILED; in do_run_with_thp()
809 if (mmap_mem == MAP_FAILED) { in do_run_with_thp()
879 if (mem == MAP_FAILED) { in do_run_with_thp()
938 if (mremap_mem != MAP_FAILED) in do_run_with_thp()
1009 if (mem == MAP_FAILED) { in run_with_hugetlb()
1022 if (dummy == MAP_FAILED) { in run_with_hugetlb()
1479 if (mem == MAP_FAILED) { in run_with_zeropage()
1485 if (mem == MAP_FAILED) { in run_with_zeropage()
1497 if (smem != MAP_FAILED) in run_with_zeropage()
[all …]
Dmadv_populate.c59 if (addr == MAP_FAILED) in test_prot_read()
80 if (addr == MAP_FAILED) in test_prot_write()
102 if (addr == MAP_FAILED) in test_holes()
172 if (addr == MAP_FAILED) in test_populate_read()
194 if (addr == MAP_FAILED) in test_populate_write()
244 if (addr == MAP_FAILED) in test_softdirty()
Dmremap_test.c110 if (remap_addr == MAP_FAILED) { in is_remap_region_valid()
203 if (src_addr == MAP_FAILED) { in get_source_mapping()
248 if (start == MAP_FAILED) { in mremap_expand_merge()
255 if (remap == MAP_FAILED) { in mremap_expand_merge()
288 if (start == MAP_FAILED) { in mremap_expand_merge_offset()
296 if (remap == MAP_FAILED) { in mremap_expand_merge_offset()
336 if (ptr == MAP_FAILED) { in mremap_move_within_range()
353 if (new_ptr == MAP_FAILED) { in mremap_move_within_range()
438 if (dest_preamble_addr == MAP_FAILED) { in remap_region()
454 if (dest_addr == MAP_FAILED) { in remap_region()
[all …]
Dmlock2-tests.c183 if (map == MAP_FAILED) in test_mlock_lock()
234 if (map == MAP_FAILED) in test_mlock_onfault()
261 if (map == MAP_FAILED) in test_lock_onfault_of_present()
284 if (map == MAP_FAILED) in test_munlockall0()
310 if (map == MAP_FAILED) in test_munlockall1()
353 if (map == MAP_FAILED) in test_vma_management()
436 if (map == MAP_FAILED) in main()
Dksm_functional_tests.c178 if (map == MAP_FAILED) { in __mmap_and_merge_range()
245 char *ret = MAP_FAILED; in mmap_and_merge_range()
266 if (map == MAP_FAILED) in test_unmerge()
304 if (map == MAP_FAILED) in test_unmerge_zero_pages()
352 if (map == MAP_FAILED) in test_unmerge_discarded()
383 if (map == MAP_FAILED) in test_unmerge_uffd_wp()
610 if (map == MAP_FAILED) in test_prctl_unmerge()
633 if (map == MAP_FAILED) in test_prot_none()
Don-fault-limit.c24 ksft_test_result(map == MAP_FAILED, "The map failed respecting mlock limits\n"); in test_limit()
26 if (map != MAP_FAILED) in test_limit()
Dvirtual_address_range.c92 if (ptr == MAP_FAILED) in validate_lower_address_hint()
172 if (ptr[i] == MAP_FAILED) { in main()
192 if (hptr[i] == MAP_FAILED) in main()
Dhmm-tests.c318 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
381 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
440 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
488 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
556 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
634 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
709 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
813 if (buffer->ptr == MAP_FAILED) { in TEST_F()
882 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
930 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F()
[all …]
Dmemfd_secret.c68 if (mem == MAP_FAILED) { in test_mlock_limit()
76 if (mem != MAP_FAILED) { in test_mlock_limit()
98 if (mem == MAP_FAILED) { in test_vmsplice()
223 if (mem == MAP_FAILED) { in test_remote_access()
Dpagemap_ioctl.c178 if (mem == MAP_FAILED) in gethugetlb_mem()
192 if (mem == MAP_FAILED) in userfaultfd_tests()
256 if (mem == MAP_FAILED) in sanity_tests_sd()
400 if (m[0] == MAP_FAILED) in sanity_tests_sd()
403 if (m[1] == MAP_FAILED) in sanity_tests_sd()
441 if (mem == MAP_FAILED) in sanity_tests_sd()
496 if (mem == MAP_FAILED) in sanity_tests_sd()
546 if (mem == MAP_FAILED) in sanity_tests_sd()
1062 if (mem == MAP_FAILED || vec == MAP_FAILED) in sanity_tests()
1090 if (mem == MAP_FAILED) in sanity_tests()
[all …]
Dmseal_test.c1185 FAIL_TEST_IF_FALSE(ret2 == (void *) MAP_FAILED); in test_seal_mremap_shrink()
1188 FAIL_TEST_IF_FALSE(ret2 != (void *) MAP_FAILED); in test_seal_mremap_shrink()
1217 FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED); in test_seal_mremap_expand()
1250 FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED); in test_seal_mremap_move()
1253 FAIL_TEST_IF_FALSE(ret2 != MAP_FAILED); in test_seal_mremap_move()
1280 FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED); in test_seal_mmap_overwrite_prot()
1311 FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED); in test_seal_mmap_expand()
1339 FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED); in test_seal_mmap_shrink()
1370 FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED); in test_seal_mremap_shrink_fixed()
1401 FAIL_TEST_IF_FALSE(ret2 == MAP_FAILED); in test_seal_mremap_expand_fixed()
[all …]
Dmigration.c133 ASSERT_NE(ptr, MAP_FAILED);
159 ASSERT_NE(ptr, MAP_FAILED);
193 ASSERT_NE(ptr, MAP_FAILED);
Dmap_populate.c60 BUG_ON(smap == MAP_FAILED, "mmap()"); in child_f()
94 BUG_ON(smap == MAP_FAILED, "mmap()"); in main()
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/
Dmmap.c56 if (CHECK(tmp1 != MAP_FAILED, "rdonly_write_mmap", "unexpected success\n")) { in test_mmap()
62 if (CHECK(tmp1 == MAP_FAILED, "rdonly_read_mmap", "failed: %d\n", errno)) in test_mmap()
75 if (CHECK(bss_mmaped == MAP_FAILED, "bss_mmap", in test_mmap()
83 if (CHECK(map_mmaped == MAP_FAILED, "data_mmap", in test_mmap()
147 if (CHECK(map_mmaped == MAP_FAILED, "data_mmap", in test_mmap()
166 if (CHECK_FAIL(p == MAP_FAILED)) in test_mmap()
182 if (CHECK(tmp1 != MAP_FAILED, "data_mmap", "mmap succeeded\n")) { in test_mmap()
202 if (CHECK(tmp0 == MAP_FAILED, "adv_mmap0", "errno %d\n", errno)) in test_mmap()
223 if (CHECK(tmp2 == MAP_FAILED, "adv_mmap3", "errno %d\n", errno)) { in test_mmap()
234 if (CHECK(tmp2 == MAP_FAILED, "adv_mmap5", "errno %d\n", errno)) { in test_mmap()
[all …]
/linux-6.12.1/tools/testing/selftests/ring-buffer/
Dmap_test.c97 if (map == MAP_FAILED) in tracefs_cpu_map()
226 ASSERT_NE(data, MAP_FAILED); in TEST_F()
233 ASSERT_NE(data, MAP_FAILED); in TEST_F()
240 ASSERT_EQ(data, MAP_FAILED); in TEST_F()
247 ASSERT_NE(data, MAP_FAILED); in TEST_F()
/linux-6.12.1/tools/testing/selftests/mincore/
Dmincore_selftest.c52 ASSERT_NE(MAP_FAILED, addr) { in TEST()
96 ASSERT_NE(MAP_FAILED, addr) { in TEST()
152 if (addr == MAP_FAILED) { in TEST()
233 ASSERT_NE(MAP_FAILED, addr) { in TEST()
332 ASSERT_NE(MAP_FAILED, addr) { in TEST()
/linux-6.12.1/tools/testing/selftests/powerpc/mm/
Dhugetlb_vs_thp_test.c20 if (p != MAP_FAILED) { in test_body()
36 if (p == MAP_FAILED) { in test_body()
/linux-6.12.1/tools/testing/selftests/memfd/
Dmemfd_test.c276 if (p == MAP_FAILED) { in mfd_assert_mmap_shared()
294 if (p == MAP_FAILED) { in mfd_assert_mmap_private()
349 if (p == MAP_FAILED) { in mfd_assert_read()
362 if (p == MAP_FAILED) { in mfd_assert_read()
381 if (p == MAP_FAILED) { in mfd_assert_read_shared()
399 if (p == MAP_FAILED) { in mfd_assert_fork_private_write()
448 if (p == MAP_FAILED) { in mfd_assert_write()
462 if (p == MAP_FAILED) { in mfd_assert_write()
477 if (p == MAP_FAILED) { in mfd_assert_write()
522 if (p != MAP_FAILED) { in mfd_fail_write()
[all …]
/linux-6.12.1/tools/testing/selftests/powerpc/signal/
Dsigreturn_vdso.c95 assert(p != MAP_FAILED); in test_sigreturn_vdso()
96 assert(mremap((void *)low, size, size, MREMAP_MAYMOVE|MREMAP_FIXED, p) != MAP_FAILED); in test_sigreturn_vdso()

12345678