From 9d24e3f04c82a0221e5d927d3e6a773a9294b694 Mon Sep 17 00:00:00 2001 From: jasper Date: Thu, 9 Sep 2021 20:08:15 +0000 Subject: [PATCH] add test for printing empty arguments ok mpi@ --- regress/usr.sbin/btrace/Makefile | 5 +++-- regress/usr.sbin/btrace/staticv-empty.bt | 4 ++++ regress/usr.sbin/btrace/staticv-empty.ok | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 regress/usr.sbin/btrace/staticv-empty.bt create mode 100644 regress/usr.sbin/btrace/staticv-empty.ok diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index bbe18079024..30b63b411e4 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.20 2021/09/09 19:02:50 jasper Exp $ +# $OpenBSD: Makefile,v 1.21 2021/09/09 20:08:15 jasper Exp $ BTRACE?= /usr/sbin/btrace ALLOWDT!= sysctl -n kern.allowdt @@ -8,7 +8,8 @@ BT_LANG_SCRIPTS= arithm beginend boolean comments delete exit \ histempty if \ map mapclear mapempty mapsyntax mapzero map-unnamed \ maxoperand min+max+sum multismts nsecs+var \ - precedence print read-map-after-clear syntaxerror + precedence print read-map-after-clear staticv-empty \ + syntaxerror # scripts that use kernel probes BT_KERN_SCRIPTS= multiprobe diff --git a/regress/usr.sbin/btrace/staticv-empty.bt b/regress/usr.sbin/btrace/staticv-empty.bt new file mode 100644 index 00000000000..288ba32f56f --- /dev/null +++ b/regress/usr.sbin/btrace/staticv-empty.bt @@ -0,0 +1,4 @@ +BEGIN +{ + printf("'%s'\n", $1); +} diff --git a/regress/usr.sbin/btrace/staticv-empty.ok b/regress/usr.sbin/btrace/staticv-empty.ok new file mode 100644 index 00000000000..a614936fa46 --- /dev/null +++ b/regress/usr.sbin/btrace/staticv-empty.ok @@ -0,0 +1 @@ +'' -- 2.20.1