Test assigning multiple probes to a single action.
authormpi <mpi@openbsd.org>
Thu, 9 Sep 2021 09:56:32 +0000 (09:56 +0000)
committermpi <mpi@openbsd.org>
Thu, 9 Sep 2021 09:56:32 +0000 (09:56 +0000)
This relies on the 'interval' provider which should always be present.

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

index 97b0b40..2173875 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.17 2021/09/09 09:38:38 mpi Exp $
+# $OpenBSD: Makefile,v 1.18 2021/09/09 09:56:32 mpi Exp $
 
 BTRACE?=                /usr/sbin/btrace
 ALLOWDT!=              sysctl -n kern.allowdt
@@ -10,7 +10,7 @@ BT_LANG_SCRIPTS=      arithm beginend boolean comments delete exit if \
                        precedence print read-map-after-clear syntaxerror
 
 # scripts that use kernel probes
-BT_KERN_SCRIPTS=
+BT_KERN_SCRIPTS=       multiprobe
 
 REGRESS_EXPECTED_FAILURES=     run-maxoperand
 
diff --git a/regress/usr.sbin/btrace/multiprobe.bt b/regress/usr.sbin/btrace/multiprobe.bt
new file mode 100644 (file)
index 0000000..e1ef3e8
--- /dev/null
@@ -0,0 +1,10 @@
+BEGIN,
+interval:hz:2
+{
+       printf("multi\n");
+}
+
+interval:hz:1
+{
+       exit();
+}
diff --git a/regress/usr.sbin/btrace/multiprobe.ok b/regress/usr.sbin/btrace/multiprobe.ok
new file mode 100644 (file)
index 0000000..9b34aa0
--- /dev/null
@@ -0,0 +1,2 @@
+multi
+multi