From: mpi Date: Mon, 5 Feb 2024 15:30:04 +0000 (+0000) Subject: Regress test for undefined probe arguments fixed in in btrace.c,v 1.83. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c403cabc1434daab43e84156f1d11e502496b3ed;p=openbsd Regress test for undefined probe arguments fixed in in btrace.c,v 1.83. Adapted from a submission from Christian Ludwig. --- diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index 6f0bb76d387..fb0a37bfc4e 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.30 2023/09/11 19:03:53 mpi Exp $ +# $OpenBSD: Makefile,v 1.31 2024/02/05 15:30:04 mpi Exp $ BTRACE?= /usr/sbin/btrace ALLOWDT!= sysctl -n kern.allowdt 2>/dev/null # scripts that don't need /dev/dt -BT_LANG_SCRIPTS= arithm beginend beginend-argn boolean comments delete \ - exit histempty if \ +BT_LANG_SCRIPTS= arithm beginend beginend-argn boolean comments \ + delete exit histempty if \ map mapclear mapempty mapsyntax mapzero map-unnamed \ maxoperand min+max+sum multismts nsecs+var \ precedence print read-map-after-clear staticv-empty \ @@ -14,7 +14,7 @@ BT_LANG_SCRIPTS= arithm beginend beginend-argn boolean comments delete \ BT_ARG_LANG_SCRIPTS= staticv str # scripts that use kernel probes -BT_KERN_SCRIPTS= empty-stmts filters mapoverwrite multiprobe +BT_KERN_SCRIPTS= argn empty-stmts filters mapoverwrite multiprobe REGRESS_EXPECTED_FAILURES= run-maxoperand diff --git a/regress/usr.sbin/btrace/argn.bt b/regress/usr.sbin/btrace/argn.bt new file mode 100644 index 00000000000..b2e89501dcf --- /dev/null +++ b/regress/usr.sbin/btrace/argn.bt @@ -0,0 +1,6 @@ +interval:hz:100 +{ + printf("%d %s %d %s %d %s %d %s %d %s\n", + arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); + exit(); +} diff --git a/regress/usr.sbin/btrace/argn.ok b/regress/usr.sbin/btrace/argn.ok new file mode 100644 index 00000000000..d3e1a999aba --- /dev/null +++ b/regress/usr.sbin/btrace/argn.ok @@ -0,0 +1 @@ +0 0 0 0 0 0 0 0 0 0