Regress test for undefined probe arguments fixed in in btrace.c,v 1.83.
authormpi <mpi@openbsd.org>
Mon, 5 Feb 2024 15:30:04 +0000 (15:30 +0000)
committermpi <mpi@openbsd.org>
Mon, 5 Feb 2024 15:30:04 +0000 (15:30 +0000)
Adapted from a submission from Christian Ludwig.

regress/usr.sbin/btrace/Makefile
regress/usr.sbin/btrace/argn.bt [new file with mode: 0644]
regress/usr.sbin/btrace/argn.ok [new file with mode: 0644]

index 6f0bb76..fb0a37b 100644 (file)
@@ -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 (file)
index 0000000..b2e8950
--- /dev/null
@@ -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 (file)
index 0000000..d3e1a99
--- /dev/null
@@ -0,0 +1 @@
+0 0 0 0 0 0 0 0 0 0