From: anton Date: Tue, 28 Sep 2021 05:40:38 +0000 (+0000) Subject: add missing sudo X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7a6bc14916e1a46453c2281a18aaad1832f34579;p=openbsd add missing sudo --- diff --git a/regress/sys/kern/pledge/sendrecvfd/Makefile b/regress/sys/kern/pledge/sendrecvfd/Makefile index e9b79bec83e..f0f5d7b5c53 100644 --- a/regress/sys/kern/pledge/sendrecvfd/Makefile +++ b/regress/sys/kern/pledge/sendrecvfd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2017/02/22 11:30:00 tb Exp $ +# $OpenBSD: Makefile,v 1.2 2021/09/28 05:40:38 anton Exp $ CFLAGS+= -Wall -Werror testtype= nopledge sendfd recvfd nosendfd norecvfd @@ -45,21 +45,33 @@ FAIL_TARGETS= test-sendfd-VDIR \ test-norecvfd-VSOCK \ test-norecvfd-VFIFO +SUDO_TARGETS= test-nopledge-VBLK \ + test-sendfd-VBLK \ + test-recvfd-VBLK \ + test-nosendfd-VBLK \ + test-norecvfd-VBLK + CLEANFILES+= sendrecvfd .for _test in ${testtype} . for _vnode in ${vnodetype} REGRESS_TARGETS+= test-${_test}-${_vnode} +. if ${SUDO_TARGETS:Mtest-${_test}-${_vnode}} +REGRESS_ROOT_TARGETS+= test-${_test}-${_vnode} +_sudo-${_test}-${_vnode}= ${SUDO} +. endif + . if ${PASS_TARGETS:Mtest-${_test}-${_vnode}} test-${_test}-${_vnode}: sendrecvfd @echo test-${_test}-${_vnode}: expected PASS - @./sendrecvfd ${_test} ${_vnode} + @${_sudo-${_test}-${_vnode}} ./sendrecvfd ${_test} ${_vnode} . elif ${FAIL_TARGETS:Mtest-${_test}-${_vnode}} test-${_test}-${_vnode}: sendrecvfd @echo test-${_test}-${_vnode}: expected FAIL - @if ./sendrecvfd ${_test} ${_vnode}; then false; else true; fi + @sudo="${SUDO_TARGETS:Mtest-${_test}-${_vnode}:C/.+/${SUDO}/}"; \ + if ${_sudo-${_test}-${_vnode}} ./sendrecvfd ${_test} ${_vnode}; then false; else true; fi . else test-${_test}-${_vnode}: