Lines Matching refs:ATF_REQUIRE
92 ATF_REQUIRE(fd >= 0);
107 ATF_REQUIRE(mprotect(map, page, PROT_WRITE) != 0);
108 ATF_REQUIRE(errno == EACCES);
109 ATF_REQUIRE(munmap(map, page) == 0);
112 ATF_REQUIRE(close(fd) == 0);
130 ATF_REQUIRE(mprotect((char *)-1, 1, PROT_READ) != 0);
131 ATF_REQUIRE(errno == EINVAL);
176 ATF_REQUIRE(map != MAP_FAILED);
182 ATF_REQUIRE(mprotect(map, page, PROT_EXEC|PROT_READ) == 0);
183 ATF_REQUIRE(((int (*)(void))map)() == 1);
186 ATF_REQUIRE(mprotect(map, page, PROT_READ) == 0);
189 ATF_REQUIRE(pid >= 0);
192 ATF_REQUIRE(signal(SIGSEGV, sighandler) != SIG_ERR);
199 ATF_REQUIRE(munmap(map, page) == 0);
201 ATF_REQUIRE(WIFEXITED(sta) != 0);
213 ATF_REQUIRE(WEXITSTATUS(sta) == SIGSEGV);
296 ATF_REQUIRE(map != MAP_FAILED);
298 ATF_REQUIRE(strlcpy(map, "XXX", 3) == 3);
299 ATF_REQUIRE(mprotect(map, page, PROT_READ) == 0);
302 ATF_REQUIRE(pid >= 0);
305 ATF_REQUIRE(signal(SIGSEGV, sighandler) != SIG_ERR);
306 ATF_REQUIRE(strlcpy(map, "XXX", 3) == 0);
311 ATF_REQUIRE(WIFEXITED(sta) != 0);
312 ATF_REQUIRE(WEXITSTATUS(sta) == SIGSEGV);
313 ATF_REQUIRE(munmap(map, page) == 0);
341 ATF_REQUIRE(map != MAP_FAILED);
343 ATF_REQUIRE(map2 != MAP_FAILED);
344 ATF_REQUIRE(mprotect(map, page, PROT_WRITE|PROT_READ) == 0);
345 ATF_REQUIRE(mprotect(map2, page, PROT_EXEC|PROT_READ) == 0);
351 ATF_REQUIRE(((int (*)(void))map2)() == 1);
355 ATF_REQUIRE(pid >= 0);
358 ATF_REQUIRE(signal(SIGSEGV, sighandler) != SIG_ERR);
359 ATF_REQUIRE(strlcpy(map2, "XXX", 3) == 0);
364 ATF_REQUIRE(WIFEXITED(sta) != 0);
365 ATF_REQUIRE(WEXITSTATUS(sta) == SIGSEGV);
370 ATF_REQUIRE(pid >= 0);
373 ATF_REQUIRE(signal(SIGSEGV, sighandler) != SIG_ERR);
374 ATF_REQUIRE(((int (*)(void))map)() == 1);
379 ATF_REQUIRE(WIFEXITED(sta) != 0);
380 ATF_REQUIRE(WEXITSTATUS(sta) == SIGSEGV);
383 ATF_REQUIRE(munmap(map, page) == 0);
384 ATF_REQUIRE(munmap(map2, page) == 0);
412 ATF_REQUIRE(map != MAP_FAILED);
414 ATF_REQUIRE(map2 != MAP_FAILED);
415 ATF_REQUIRE(mprotect(map2, page, PROT_EXEC|PROT_READ) == 0);
421 ATF_REQUIRE(((int (*)(void))map2)() == 1);
424 ATF_REQUIRE(pid >= 0);
435 ATF_REQUIRE(((int (*)(void))map2)() == 2);
437 ATF_REQUIRE(munmap(map, page) == 0);
438 ATF_REQUIRE(munmap(map2, page) == 0);
444 ATF_REQUIRE(page >= 0);