lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 11 Feb 2024 00:50:00 +0100
From: Ɓukasz Bartosik <ukaszb@...omium.org>
To: Jason Baron <jbaron@...mai.com>,
	Jim Cromie <jim.cromie@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kees Cook <keescook@...omium.org>,
	Douglas Anderson <dianders@...omium.org>
Cc: Guenter Roeck <groeck@...gle.com>,
	Yaniv Tzoreff <yanivt@...gle.com>,
	Benson Leung <bleung@...gle.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Vincent Whitchurch <vincent.whitchurch@...s.com>,
	Pekka Paalanen <ppaalanen@...il.com>,
	Sean Paul <seanpaul@...omium.org>,
	Daniel Vetter <daniel@...ll.ch>,
	Simon Ser <contact@...rsion.fr>,
	John Ogness <john.ogness@...utronix.de>,
	Petr Mladek <pmladek@...e.com>,
	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	linux-kernel@...r.kernel.org,
	upstream@...ihalf.com
Subject: [PATCH v4 30/39] dyndbg-test: fixup search-trace-name help

From: Jim Cromie <jim.cromie@...il.com>

The recent change to do whole-buf search (not just single line) had
the side-effect of printing too much $output, which hides the
information in clutter.  Print the search pattern instead.

Also add -v last arg handling, like in check_match_ct().  This lets a
single caller enable verbose output, to see the trace-bufs content.

Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
 tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
index a48cb57aa5cb..d1f447eef4c0 100755
--- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
+++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
@@ -159,6 +159,7 @@ function search_trace() {
 # $1 - trace instance name, 0 for global event trace
 # $2 - line number counting from the bottom
 # $3 - text to search for
+# $4 - optional -v to see verbose results
 function search_trace_name() {
 	if [ "$1" = "0" ]; then
 	    buf=$(cat /sys/kernel/debug/tracing/trace)
@@ -179,8 +180,9 @@ function search_trace_name() {
 		    in line '$line' or '$buf'"
 	    exit
 	fi
-	if [ $v_search_trace = 1 ]; then
-	    echo -e "${MAGENTA}: search_trace_name in $1 found: \n$output \nin:${BLUE} $buf ${NC}"
+	if [[ "$4" == "-v" || "$v_search_trace" = 1 ]]; then
+	    echo -e "${MAGENTA}: search_trace_name in $1 found: \n${YELLOW}$3 \
+		    \nin:${BLUE} $buf ${NC}"
         fi
 }
 
-- 
2.43.0.687.g38aa6559b0-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ