summaryrefslogtreecommitdiff
path: root/regress/usr.sbin
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2021-09-16 10:54:36 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2021-09-16 10:54:36 +0000
commit1760a096d6cde0383eb4c492d7240beec6c73f0b (patch)
tree6a7b5e4c88c173950cd78f01becfc2fc37341180 /regress/usr.sbin
parent1b5a5f0ed523d296f0f21aa114cc1d8f72cb4846 (diff)
various improvements:
* use SUDO when needed * favor paths relative to the btrace regress directory in the expected output files, prevents one from being forced to checkout the src tree at /usr/src in order to make the tests pass
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r--regress/usr.sbin/btrace/Makefile7
-rw-r--r--regress/usr.sbin/btrace/mapsyntax.ok4
-rw-r--r--regress/usr.sbin/btrace/syntaxerror.ok2
3 files changed, 6 insertions, 7 deletions
diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile
index 30b63b411e4..a2382250585 100644
--- a/regress/usr.sbin/btrace/Makefile
+++ b/regress/usr.sbin/btrace/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.21 2021/09/09 20:08:15 jasper Exp $
+# $OpenBSD: Makefile,v 1.22 2021/09/16 10:54:35 anton Exp $
BTRACE?= /usr/sbin/btrace
ALLOWDT!= sysctl -n kern.allowdt
@@ -19,8 +19,7 @@ REGRESS_EXPECTED_FAILURES= run-maxoperand
.for b in ${BT_LANG_SCRIPTS}
REGRESS_TARGETS+= run-$b
run-$b:
- ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \
- diff -u ${.CURDIR}/$b.ok /dev/stdin
+ cd ${.CURDIR} && ${BTRACE} $b.bt 2>&1 | diff -u $b.ok /dev/stdin
.endfor
b=staticv
@@ -34,7 +33,7 @@ REGRESS_TARGETS+= run-$b
REGRESS_ROOT_TARGETS+= run-$b
run-$b:
.if ${ALLOWDT}
- ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \
+ ${SUDO} ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \
diff -u ${.CURDIR}/$b.ok /dev/stdin
.else
@echo SKIPPED
diff --git a/regress/usr.sbin/btrace/mapsyntax.ok b/regress/usr.sbin/btrace/mapsyntax.ok
index 09ce285cc32..bebe2a9b8b0 100644
--- a/regress/usr.sbin/btrace/mapsyntax.ok
+++ b/regress/usr.sbin/btrace/mapsyntax.ok
@@ -1,6 +1,6 @@
-/usr/src/regress/usr.sbin/btrace/mapsyntax.bt:2:8: syntax error:
+mapsyntax.bt:2:8: syntax error:
zero(42);
^
-/usr/src/regress/usr.sbin/btrace/mapsyntax.bt:6:8: syntax error:
+mapsyntax.bt:6:8: syntax error:
clear(0);
^
diff --git a/regress/usr.sbin/btrace/syntaxerror.ok b/regress/usr.sbin/btrace/syntaxerror.ok
index 6e335c69456..4f03a52941b 100644
--- a/regress/usr.sbin/btrace/syntaxerror.ok
+++ b/regress/usr.sbin/btrace/syntaxerror.ok
@@ -1,3 +1,3 @@
-/usr/src/regress/usr.sbin/btrace/syntaxerror.bt:3:4: syntax error:
+syntaxerror.bt:3:4: syntax error:
foo;
^