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
102 if (pagemap_is_softdirty(pagemap_fd, map) == 1) { in test_hugepage()
111 if (pagemap_is_softdirty(pagemap_fd, map) == 0) { in test_hugepage()
127 static void test_mprotect(int pagemap_fd, int pagesize, bool anon) in test_mprotect() argument
154 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 1, in test_mprotect()
158 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 0, in test_mprotect()
162 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 0, in test_mprotect()
166 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 0, in test_mprotect()
170 ksft_test_result(pagemap_is_softdirty(pagemap_fd, map) == 1, in test_mprotect()
180 static void test_mprotect_anon(int pagemap_fd, int pagesize) in test_mprotect_anon() argument
182 test_mprotect(pagemap_fd, pagesize, true); in test_mprotect_anon()
185 static void test_mprotect_file(int pagemap_fd, int pagesize) in test_mprotect_file() argument
187 test_mprotect(pagemap_fd, pagesize, false); in test_mprotect_file()
192 int pagemap_fd; in main() local
198 pagemap_fd = open(PAGEMAP_FILE_PATH, O_RDONLY); in main()
199 if (pagemap_fd < 0) in main()
204 test_simple(pagemap_fd, pagesize); in main()
205 test_vma_reuse(pagemap_fd, pagesize); in main()
206 test_hugepage(pagemap_fd, pagesize); in main()
207 test_mprotect_anon(pagemap_fd, pagesize); in main()
208 test_mprotect_file(pagemap_fd, pagesize); in main()
210 close(pagemap_fd); in main()