Home
last modified time | relevance | path

Searched refs:mmap_ptr (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dringbuf.c93 void *mmap_ptr, *tmp_ptr; in ringbuf_subtest() local
108 ASSERT_OK_PTR(mmap_ptr, "rw_cons_pos"); in ringbuf_subtest()
113 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_rw"); in ringbuf_subtest()
118 ASSERT_ERR_PTR(mmap_ptr, "wr_prod_pos"); in ringbuf_subtest()
124 ASSERT_ERR_PTR(mmap_ptr, "wr_data_page_one"); in ringbuf_subtest()
127 ASSERT_ERR_PTR(mmap_ptr, "wr_data_page_two"); in ringbuf_subtest()
129 ASSERT_ERR_PTR(mmap_ptr, "wr_data_page_all"); in ringbuf_subtest()
133 if (!ASSERT_OK_PTR(mmap_ptr, "ro_prod_pos")) in ringbuf_subtest()
139 ASSERT_OK(munmap(mmap_ptr, 4 * page_size), "unmap_ro"); in ringbuf_subtest()
143 if (!ASSERT_OK_PTR(mmap_ptr, "ro_prod_pos")) in ringbuf_subtest()
[all …]
H A Duser_ringbuf.c103 void *mmap_ptr; in test_user_ringbuf_mappings() local
112 mmap_ptr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, rb_fd, 0); in test_user_ringbuf_mappings()
113 ASSERT_OK_PTR(mmap_ptr, "ro_cons_pos"); in test_user_ringbuf_mappings()
119 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_ro_cons"); in test_user_ringbuf_mappings()
122 mmap_ptr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, in test_user_ringbuf_mappings()
124 ASSERT_OK_PTR(mmap_ptr, "rw_prod_pos"); in test_user_ringbuf_mappings()
128 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_rw_prod"); in test_user_ringbuf_mappings()
131 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, in test_user_ringbuf_mappings()
133 ASSERT_OK_PTR(mmap_ptr, "rw_data"); in test_user_ringbuf_mappings()
134 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_data_protect"); in test_user_ringbuf_mappings()
[all …]