1. Make permit tests use wsrc instead of wobj (because basically, to run
test you need obj being writable, unless you want to pollute /usr/src);
2. Test if current user is in wobj group prior running the test, and skip
the test if he is not.
-# $OpenBSD: Makefile,v 1.3 2015/07/28 12:25:27 zhuk Exp $
+# $OpenBSD: Makefile,v 1.4 2017/05/30 20:46:03 zhuk Exp $
REGRESS_TARGETS = \
t-okay \
.for t in ${REGRESS_TARGETS:M*-permit*}
${t}:
@echo '$@'
- @rv=true; \
+ @id | grep '(wobj)' >/dev/null || { echo SKIPPED; exit 0; } ; \
+ rv=true; \
while read ident cmdline; do \
read expected; \
set +e; \
-permit :wsrc as root cmd echo args la-la-la
-permit :wsrc as operator cmd echo args
-permit nopass :wsrc as www cmd echo args slackers
+permit :wobj as root cmd echo args la-la-la
+permit :wobj as operator cmd echo args
+permit nopass :wobj as www cmd echo args slackers