From ebdf76ca7f4f6c3dba0594720c4318e9401d1aeb Mon Sep 17 00:00:00 2001 From: mpi Date: Thu, 9 Sep 2021 09:56:32 +0000 Subject: [PATCH] Test assigning multiple probes to a single action. This relies on the 'interval' provider which should always be present. --- regress/usr.sbin/btrace/Makefile | 4 ++-- regress/usr.sbin/btrace/multiprobe.bt | 10 ++++++++++ regress/usr.sbin/btrace/multiprobe.ok | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 regress/usr.sbin/btrace/multiprobe.bt create mode 100644 regress/usr.sbin/btrace/multiprobe.ok diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index 97b0b40539e..2173875b57c 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -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 index 00000000000..e1ef3e8b197 --- /dev/null +++ b/regress/usr.sbin/btrace/multiprobe.bt @@ -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 index 00000000000..9b34aa06316 --- /dev/null +++ b/regress/usr.sbin/btrace/multiprobe.ok @@ -0,0 +1,2 @@ +multi +multi -- 2.20.1