diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-01-30 18:19:54 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-01-30 18:19:54 +0000 |
commit | d5100ebce7f04b93940aa3a2497c04aa967c1d66 (patch) | |
tree | cb30e49a10011501a2a8caa8e5c0f4785a7a7406 | |
parent | b041ee2191ade70ef14cd890ef14247d4f59f1cd (diff) |
unbreak httpd regress tests after wobj change
Previously, the tests used the obj dir as the httpd chroot/root. But
the www user cannot access any files since we switched obj to 0750.
The fix is to create another 0755 subdirectory obj/htdocs as the root.
-rw-r--r-- | regress/usr.sbin/httpd/tests/Makefile | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/regress/usr.sbin/httpd/tests/Makefile b/regress/usr.sbin/httpd/tests/Makefile index b4f13e04b2d..15b0cc61df2 100644 --- a/regress/usr.sbin/httpd/tests/Makefile +++ b/regress/usr.sbin/httpd/tests/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2016/09/23 20:02:00 bluhm Exp $ +# $OpenBSD: Makefile,v 1.5 2017/01/30 18:19:53 reyk Exp $ # The following ports must be installed for the regression tests: # p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets @@ -28,10 +28,11 @@ REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} CLEANFILES += *.log httpd.conf ktrace.out stamp-* CLEANFILES += *.pem *.req *.crt *.key *.srl md5-* -HTDOCS = 512 1048576 1073741824 -HTDOCS_MD5 = ${HTDOCS:S/^/${.OBJDIR}\/md5-/} +HTDOCS = ${.OBJDIR}/htdocs +HTDOCS_FILES = 512 1048576 1073741824 +HTDOCS_MD5 = ${HTDOCS_FILES:S/^/${.OBJDIR}\/md5-/} HTDOCS_SPARSE = yes -CLEANFILES += ${HTDOCS} +CLEANFILES += ${HTDOCS_FILES} # Set variables so that make runs with and without obj directory. # Only do that if necessary to keep visible output short. @@ -48,15 +49,18 @@ PERLPATH = ${.CURDIR}/ # test parameters. Generally they consist of client, httpd, server. .for a in ${ARGS} -run-regress-$a: $a ${HTDOCS_MD5} +run-regress-$a: ${HTDOCS} $a ${HTDOCS_MD5} @echo '\n======== $@ ========' - time SUDO=${SUDO} KTRACE=${KTRACE} HTTPD=${HTTPD} perl ${PERLINC} ${PERLPATH}httpd.pl ${.OBJDIR} ${PERLPATH}$a + time SUDO=${SUDO} KTRACE=${KTRACE} HTTPD=${HTTPD} perl ${PERLINC} ${PERLPATH}httpd.pl ${HTDOCS} ${PERLPATH}$a .endfor # htdocs -.for d in ${HTDOCS} -${.OBJDIR}/$d: +${HTDOCS}: + @mkdir -m 0755 -p ${HTDOCS} + +.for d in ${HTDOCS_FILES} +${HTDOCS}/$d: @echo '\n======== file: $d ========' .if (${HTDOCS_SPARSE} != "yes") @dd if=/dev/arandom of=$@ count=$$(($d / 512)) bs=512 @@ -64,8 +68,8 @@ ${.OBJDIR}/$d: @dd of=$@ seek=$$(($d / 512)) bs=512 count=0 status=none .endif -${.OBJDIR}/md5-$d: ${.OBJDIR}/$d - @md5 -q ${.OBJDIR}/$d > $@ +${.OBJDIR}/md5-$d: ${HTDOCS}/$d + @md5 -q ${HTDOCS}/$d > $@ .endfor # create certificates for TLS |