From 8420ddd22163c7b6d4286d461c57d5edee71f410 Mon Sep 17 00:00:00 2001 From: mpi Date: Tue, 27 Feb 2024 12:50:33 +0000 Subject: [PATCH] Printing large tuples require more than 64 chars, bump the string limit. --- regress/usr.sbin/btrace/str.args | 2 +- regress/usr.sbin/btrace/str.bt | 2 +- regress/usr.sbin/btrace/str.ok | 2 +- usr.sbin/btrace/btrace.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/regress/usr.sbin/btrace/str.args b/regress/usr.sbin/btrace/str.args index 355af032cf6..f162d36b529 100644 --- a/regress/usr.sbin/btrace/str.args +++ b/regress/usr.sbin/btrace/str.args @@ -3,5 +3,5 @@ is "free!" 4 SSH -111111111111111111111111111111111111111111111111111111111111112333 +1111111111111111111111111111111111111111111111111111111111111112111111111111111111111111111111111111111111111111111111111111112333 2 diff --git a/regress/usr.sbin/btrace/str.bt b/regress/usr.sbin/btrace/str.bt index 84455aa2cfc..e7953bdb984 100644 --- a/regress/usr.sbin/btrace/str.bt +++ b/regress/usr.sbin/btrace/str.bt @@ -6,7 +6,7 @@ BEGIN { /* 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 */ + /* Should truncate long arguments to STRLEN bytes */ printf("No 3 please: %s\n", str($6)); /* Should support nested expressions for the index */ diff --git a/regress/usr.sbin/btrace/str.ok b/regress/usr.sbin/btrace/str.ok index 88c5ba720d6..57d14c2253f 100644 --- a/regress/usr.sbin/btrace/str.ok +++ b/regress/usr.sbin/btrace/str.ok @@ -1,5 +1,5 @@ OpenBSD is free! OpenSSH is free! -No 3 please: 111111111111111111111111111111111111111111111111111111111111112 +No 3 please: 1111111111111111111111111111111111111111111111111111111111111112111111111111111111111111111111111111111111111111111111111111112 Open Open diff --git a/usr.sbin/btrace/btrace.h b/usr.sbin/btrace/btrace.h index b5fb90f8c0a..0e4c26da6cc 100644 --- a/usr.sbin/btrace/btrace.h +++ b/usr.sbin/btrace/btrace.h @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.h,v 1.13 2023/09/11 19:01:26 mpi Exp $ */ +/* $OpenBSD: btrace.h,v 1.14 2024/02/27 12:50:33 mpi Exp $ */ /* * Copyright (c) 2019 - 2020 Martin Pieuchot @@ -58,7 +58,7 @@ void hist_increment(struct hist *, const char *); void hist_print(struct hist *, const char *); #define KLEN 1024 /* # of characters in map key, contain a stack trace */ -#define STRLEN 64 /* maximum # of bytes to output via str() function */ +#define STRLEN 128 /* maximum # of bytes to output via str() function */ /* printf.c */ int stmt_printf(struct bt_stmt *, struct dt_evt *); -- 2.20.1