diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2023-09-11 19:03:54 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2023-09-11 19:03:54 +0000 |
commit | 31b6cfc44a173157b9a7045e7ad59cf84ba63f80 (patch) | |
tree | 8ce2849a0fdad19f76324d15991d3bef02c0285d /regress/usr.sbin | |
parent | da0ebb18f1c0216022f26f257a837f4db4eb553f (diff) |
Regressions for tuples and evaluating variables.
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r-- | regress/usr.sbin/btrace/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.sbin/btrace/tuple.bt | 4 | ||||
-rw-r--r-- | regress/usr.sbin/btrace/tuple.ok | 1 | ||||
-rw-r--r-- | regress/usr.sbin/btrace/tupleeval.bt | 8 | ||||
-rw-r--r-- | regress/usr.sbin/btrace/tupleeval.ok | 1 | ||||
-rw-r--r-- | regress/usr.sbin/btrace/vareval.bt | 5 | ||||
-rw-r--r-- | regress/usr.sbin/btrace/vareval.ok | 1 |
7 files changed, 22 insertions, 2 deletions
diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index a5b37cbab83..6f0bb76d387 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -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 index 00000000000..80124c4878a --- /dev/null +++ b/regress/usr.sbin/btrace/tuple.bt @@ -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 index 00000000000..a75bd975a86 --- /dev/null +++ b/regress/usr.sbin/btrace/tuple.ok @@ -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 index 00000000000..aeee95c6dbd --- /dev/null +++ b/regress/usr.sbin/btrace/tupleeval.bt @@ -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 index 00000000000..ea54e1e11cb --- /dev/null +++ b/regress/usr.sbin/btrace/tupleeval.ok @@ -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 index 00000000000..3ea83a52dc1 --- /dev/null +++ b/regress/usr.sbin/btrace/vareval.bt @@ -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 index 00000000000..366a59e1349 --- /dev/null +++ b/regress/usr.sbin/btrace/vareval.ok @@ -0,0 +1 @@ +@m[42]: 5 |