summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/btrace
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-03-19 15:53:10 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-03-19 15:53:10 +0000
commita560a8f9c912b1d65ff73a3fc640f342ac9da428 (patch)
treef0a91ca7930b39a6185d86dc79b4061877891a1d /regress/usr.sbin/btrace
parent4a2423738b02851ea9c4b7a0482a9abdfc4a2207 (diff)
Regression for unnamed map.
Diffstat (limited to 'regress/usr.sbin/btrace')
-rw-r--r--regress/usr.sbin/btrace/Makefile6
-rw-r--r--regress/usr.sbin/btrace/map-unnamed.bt13
-rw-r--r--regress/usr.sbin/btrace/map-unnamed.ok4
3 files changed, 20 insertions, 3 deletions
diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile
index 0144980b202..d1de80160fd 100644
--- a/regress/usr.sbin/btrace/Makefile
+++ b/regress/usr.sbin/btrace/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.3 2020/01/28 16:39:51 mpi Exp $
+# $OpenBSD: Makefile,v 1.4 2020/03/19 15:53:09 mpi Exp $
BTRACE?= /usr/sbin/btrace
# scripts that don't need /dev/dt
-BT_LANG_SCRIPTS= arithm beginend comments delete exit map maxoperand \
- min+max+sum multismts nsecs+var
+BT_LANG_SCRIPTS= arithm beginend comments delete exit map map-unnamed \
+ maxoperand min+max+sum multismts nsecs+var
BT_KERN_SCRIPTS=
diff --git a/regress/usr.sbin/btrace/map-unnamed.bt b/regress/usr.sbin/btrace/map-unnamed.bt
new file mode 100644
index 00000000000..b344771bec7
--- /dev/null
+++ b/regress/usr.sbin/btrace/map-unnamed.bt
@@ -0,0 +1,13 @@
+BEGIN
+{
+ @[8 - 1] = count();
+ printf("=> Print with one element\n");
+ print(@);
+}
+
+END
+{
+ @[7] = count();
+ printf("=> Print all map:\n");
+ print(@);
+}
diff --git a/regress/usr.sbin/btrace/map-unnamed.ok b/regress/usr.sbin/btrace/map-unnamed.ok
new file mode 100644
index 00000000000..f8ad54d8fd9
--- /dev/null
+++ b/regress/usr.sbin/btrace/map-unnamed.ok
@@ -0,0 +1,4 @@
+=> Print with one element
+@[7]: 1
+=> Print all map:
+@[7]: 2