Regressions for tuples and evaluating variables.
authormpi <mpi@openbsd.org>
Mon, 11 Sep 2023 19:03:53 +0000 (19:03 +0000)
committermpi <mpi@openbsd.org>
Mon, 11 Sep 2023 19:03:53 +0000 (19:03 +0000)
regress/usr.sbin/btrace/Makefile
regress/usr.sbin/btrace/tuple.bt [new file with mode: 0644]
regress/usr.sbin/btrace/tuple.ok [new file with mode: 0644]
regress/usr.sbin/btrace/tupleeval.bt [new file with mode: 0644]
regress/usr.sbin/btrace/tupleeval.ok [new file with mode: 0644]
regress/usr.sbin/btrace/vareval.bt [new file with mode: 0644]
regress/usr.sbin/btrace/vareval.ok [new file with mode: 0644]

index a5b37cb..6f0bb76 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.29 2023/09/02 19:28:46 dv Exp $
+# $OpenBSD: Makefile,v 1.30 2023/09/11 19:03:53 mpi Exp $
 
 BTRACE?=                /usr/sbin/btrace
 ALLOWDT!=              sysctl -n kern.allowdt 2>/dev/null
@@ -9,7 +9,7 @@ BT_LANG_SCRIPTS=        arithm beginend beginend-argn boolean comments delete \
                        map mapclear mapempty mapsyntax mapzero map-unnamed \
                        maxoperand min+max+sum multismts nsecs+var \
                        precedence print read-map-after-clear staticv-empty \
-                       syntaxerror
+                       syntaxerror tuple tupleeval vareval
 
 BT_ARG_LANG_SCRIPTS=   staticv str
 
diff --git a/regress/usr.sbin/btrace/tuple.bt b/regress/usr.sbin/btrace/tuple.bt
new file mode 100644 (file)
index 0000000..80124c4
--- /dev/null
@@ -0,0 +1,4 @@
+BEGIN {
+       $t = (1, 42, "something");
+       printf("%d %s\n", $t.1, $t.2);
+}
diff --git a/regress/usr.sbin/btrace/tuple.ok b/regress/usr.sbin/btrace/tuple.ok
new file mode 100644 (file)
index 0000000..a75bd97
--- /dev/null
@@ -0,0 +1 @@
+42 something
diff --git a/regress/usr.sbin/btrace/tupleeval.bt b/regress/usr.sbin/btrace/tupleeval.bt
new file mode 100644 (file)
index 0000000..aeee95c
--- /dev/null
@@ -0,0 +1,8 @@
+BEGIN {
+       $t = (5, comm, "str", probe);
+       @u = $t;
+}
+
+END {
+       print(@u)
+}
diff --git a/regress/usr.sbin/btrace/tupleeval.ok b/regress/usr.sbin/btrace/tupleeval.ok
new file mode 100644 (file)
index 0000000..ea54e1e
--- /dev/null
@@ -0,0 +1 @@
+(5, btrace, str, BEGIN)
diff --git a/regress/usr.sbin/btrace/vareval.bt b/regress/usr.sbin/btrace/vareval.bt
new file mode 100644 (file)
index 0000000..3ea83a5
--- /dev/null
@@ -0,0 +1,5 @@
+BEGIN {
+       $tmp = 5;
+       @t = $tmp;
+       @m[42] = @t;
+}
diff --git a/regress/usr.sbin/btrace/vareval.ok b/regress/usr.sbin/btrace/vareval.ok
new file mode 100644 (file)
index 0000000..366a59e
--- /dev/null
@@ -0,0 +1 @@
+@m[42]: 5