From: mpi Date: Thu, 9 Sep 2021 09:38:38 +0000 (+0000) Subject: Prepare for executing regress triggering kernel probes. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=124dd127009f3019855b9d63317f6edeb721a7b4;p=openbsd Prepare for executing regress triggering kernel probes. root and kern.allowdt=1 are needed for those, otherwise mark them as SKIPPED. --- diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index 59665a073a7..97b0b40539e 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.16 2021/09/09 06:59:51 mpi Exp $ +# $OpenBSD: Makefile,v 1.17 2021/09/09 09:38:38 mpi Exp $ BTRACE?= /usr/sbin/btrace +ALLOWDT!= sysctl -n kern.allowdt # scripts that don't need /dev/dt BT_LANG_SCRIPTS= arithm beginend boolean comments delete exit if \ @@ -8,7 +9,7 @@ BT_LANG_SCRIPTS= arithm beginend boolean comments delete exit if \ maxoperand min+max+sum multismts nsecs+var \ precedence print read-map-after-clear syntaxerror - +# scripts that use kernel probes BT_KERN_SCRIPTS= REGRESS_EXPECTED_FAILURES= run-maxoperand @@ -20,4 +21,16 @@ run-$b: diff -u ${.CURDIR}/$b.ok /dev/stdin .endfor +.for b in ${BT_KERN_SCRIPTS} +REGRESS_TARGETS+= run-$b +REGRESS_ROOT_TARGETS+= run-$b +run-$b: +.if ${ALLOWDT} + ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \ + diff -u ${.CURDIR}/$b.ok /dev/stdin +.else + @echo SKIPPED +.endif +.endfor + .include