summaryrefslogtreecommitdiff
path: root/regress/sys/kern/noexec/Makefile
blob: 836fb6288e60fc50543ab0406d563400a95ff8e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#	$OpenBSD: Makefile,v 1.20 2019/05/10 15:58:22 visa Exp $

PROG=		noexec
SRCS=		noexec.c testfly.S
CFLAGS=		-Wall -fno-inline
LDSTATIC=	${STATIC}

REGRESS_TARGETS=	nxtext-mmap	nxtext-mprotect \
		nxdata	nxdata-mmap	nxdata-mprotect \
		nxbss	nxbss-mmap	nxbss-mprotect \
		nxheap	nxheap-mmap	nxheap-mprotect \
		nxmmap			nxmmap-mprotect \
		nxstack	nxstack-mmap	nxstack-mprotect
.PHONY: ${REGRESS_TARGETS}

nxtext-mmap: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -T -m

nxtext-mprotect: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -T -p

nxdata: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -D

nxdata-mprotect: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -D -p

nxdata-mmap: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -D -m

nxbss: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -B

nxbss-mmap: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -B -m

nxbss-mprotect: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -B -p

nxheap: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -H

nxheap-mmap: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -H -m

nxheap-mprotect: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -H -p

nxstack: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -S

nxstack-mmap: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -S -m

nxstack-mprotect: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -S -p

nxmmap: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -m

nxmmap-mprotect: ${PROG}
	@echo '\n====== $@ ======'
	./${PROG} -m -p

.if ${MACHINE} != "alpha" && \
    ${MACHINE} != "amd64" && \
    ${MACHINE} != "arm64" && \
    ${MACHINE} != "armv7" && \
    ${MACHINE} != "hppa" && \
    ${MACHINE} != "i386" && \
    ${MACHINE} != "octeon" && \
    ${MACHINE} != "sparc64"
REGRESS_TARGETS=run-regress-skiparch
run-regress-skiparch:
	# this architecture has no test for this
	@echo SKIPPED
.endif

.include <bsd.regress.mk>