Lines Matching refs:pagemap_fd
15 static void test_simple(int pagemap_fd, int pagesize) in test_simple() argument
27 if (pagemap_is_softdirty(pagemap_fd, map) == 1) { in test_simple()
36 if (pagemap_is_softdirty(pagemap_fd, map) == 0) { in test_simple()
48 static void test_vma_reuse(int pagemap_fd, int pagesize) in test_vma_reuse() argument
57 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 1, in test_vma_reuse()
69 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map2) == 1, in test_vma_reuse()
77 static void test_hugepage(int pagemap_fd, int pagesize) in test_hugepage() argument
99 if (pagemap_is_softdirty(pagemap_fd, map) == 1) { in test_hugepage()
108 if (pagemap_is_softdirty(pagemap_fd, map) == 0) { in test_hugepage()
124 static void test_mprotect(int pagemap_fd, int pagesize, bool anon) in test_mprotect() argument
151 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 1, in test_mprotect()
155 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 0, in test_mprotect()
159 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 0, in test_mprotect()
163 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 0, in test_mprotect()
167 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 1, in test_mprotect()
177 static void test_mprotect_anon(int pagemap_fd, int pagesize) in test_mprotect_anon() argument
179 test_mprotect(pagemap_fd, pagesize, true); in test_mprotect_anon()
182 static void test_mprotect_file(int pagemap_fd, int pagesize) in test_mprotect_file() argument
184 test_mprotect(pagemap_fd, pagesize, false); in test_mprotect_file()
189 int pagemap_fd; in main() local
195 pagemap_fd = open(PAGEMAP_FILE_PATH, O_RDONLY); in main()
196 if (pagemap_fd < 0) in main()
201 test_simple(pagemap_fd, pagesize); in main()
202 test_vma_reuse(pagemap_fd, pagesize); in main()
203 test_hugepage(pagemap_fd, pagesize); in main()
204 test_mprotect_anon(pagemap_fd, pagesize); in main()
205 test_mprotect_file(pagemap_fd, pagesize); in main()
207 close(pagemap_fd); in main()