From: dv Date: Sun, 3 Oct 2021 22:19:03 +0000 (+0000) Subject: Unbreak btrace(8) regress, adding missing files. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=abd01fcea2dba4aeb14ac3904e7e381a9d8f95c5;p=openbsd Unbreak btrace(8) regress, adding missing files. --- diff --git a/regress/usr.sbin/btrace/staticv.args b/regress/usr.sbin/btrace/staticv.args new file mode 100644 index 00000000000..7f9ba4056bd --- /dev/null +++ b/regress/usr.sbin/btrace/staticv.args @@ -0,0 +1,3 @@ +42 +1337 +-2019 diff --git a/regress/usr.sbin/btrace/str.args b/regress/usr.sbin/btrace/str.args new file mode 100644 index 00000000000..355af032cf6 --- /dev/null +++ b/regress/usr.sbin/btrace/str.args @@ -0,0 +1,7 @@ +OpenBSD +is +"free!" +4 +SSH +111111111111111111111111111111111111111111111111111111111111112333 +2 diff --git a/regress/usr.sbin/btrace/str.bt b/regress/usr.sbin/btrace/str.bt new file mode 100644 index 00000000000..84455aa2cfc --- /dev/null +++ b/regress/usr.sbin/btrace/str.bt @@ -0,0 +1,15 @@ +/* Tests for str() */ +BEGIN { + /* Should pass through regular string args */ + printf("%s %s %s\n", $1, $2, str($3)); + + /* Should truncate when given an index < the max (currently 64) */ + printf("%sSSH %s %s\n", str($1, $4), $2, $3); + + /* Should truncate long arguments to 64 bytes */ + printf("No 3 please: %s\n", str($6)); + + /* Should support nested expressions for the index */ + print(str($1, 2 + 2)); + print(str($1, 2 + $7)); +} diff --git a/regress/usr.sbin/btrace/str.ok b/regress/usr.sbin/btrace/str.ok new file mode 100644 index 00000000000..88c5ba720d6 --- /dev/null +++ b/regress/usr.sbin/btrace/str.ok @@ -0,0 +1,5 @@ +OpenBSD is free! +OpenSSH is free! +No 3 please: 111111111111111111111111111111111111111111111111111111111111112 +Open +Open