Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3] Add gstack script
Date: Fri, 20 Dec 2024 10:18:13 -0800	[thread overview]
Message-ID: <c762df11-4a3b-4dfc-b8a7-249987ace464@redhat.com> (raw)
In-Reply-To: <87v7ve8h5b.fsf@tromey.com>

On 12/20/24 8:15 AM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
> 
> Keith> --- Changes in v3
> [...]
> 
> Looks good to me.  Thank you.
> Approved-By: Tom Tromey <tom@tromey.com>

Thank you for the review, but there's one little snafu:
Linaro CI apparently does not have any awk program installed
when running tests and flagged a new failure from gstack.exp:

PASS: gdb.base/gstack.exp: spawn gstack
/home/tcwg-build/workspace/tcwg_gnu_0/abe/builds/armv8l-unknown-linux-gnueabihf/armv8l-unknown-linux-gnueabihf/gdb-gdb.git~master/gdb/testsuite/../../gdb/gstack: 
could not find usable awk interpreter
GSTACK-END
PASS: gdb.base/gstack.exp: gstack exits with no error
PASS: gdb.base/gstack.exp: gstack's exit status is 0
FAIL: gdb.base/gstack.exp: got backtrace

There are some tests which unconditionally use "gawk" (such as
gdb.base/gnu-debugdata.exp), so I've chosen to address this
failure by using the following patch:

diff --git a/gdb/testsuite/gdb.base/gstack.exp 
b/gdb/testsuite/gdb.base/gstack.exp
index 451f2475dd1..1ad1402e2be 100644
--- a/gdb/testsuite/gdb.base/gstack.exp
+++ b/gdb/testsuite/gdb.base/gstack.exp
@@ -59,6 +59,7 @@ if { ![gdb_assert { ![expr {$res < 0 || $res == ""}] } 
$test] } {

  set test "got backtrace"
  set saw_backtrace false
+set no_awk false
  gdb_test_multiple "" $test {
      -i "$res" -re "#0 +(0x\[0-9a-f\]+ in )?main 
\(\).*\r\nGSTACK-END\r\n\$" {
  	set saw_backtrace true
@@ -66,6 +67,11 @@ gdb_test_multiple "" $test {
  	exp_continue
      }

+    -i "$res" "could not find usable awk interpreter" {
+	set no_awk true
+	exp_continue
+    }
+
      eof {
  	set result [wait -i $res]
  	verbose $result
@@ -76,7 +82,9 @@ gdb_test_multiple "" $test {
  	remote_close host
      }
  }
-if {!$saw_backtrace} {
+if {$no_awk} {
+    unsupported "no awk interpreter found"
+} elseif {!$saw_backtrace} {
      fail $test
  }

Please let me know if this is still acceptable.

Keith


  reply	other threads:[~2024-12-20 18:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 18:18 [PATCH] " Keith Seitz
2024-12-11 16:51 ` Andrew Burgess
2024-12-11 16:58   ` Keith Seitz
2024-12-12 21:07 ` [PATCH v2] " Keith Seitz
2024-12-13  7:36   ` Eli Zaretskii
2024-12-13 18:21     ` Keith Seitz
2024-12-13 19:04       ` Eli Zaretskii
2024-12-13 19:45   ` Tom Tromey
2024-12-13 19:57     ` Keith Seitz
2024-12-18 18:05 ` [PATCH v3] " Keith Seitz
2024-12-18 19:22   ` Eli Zaretskii
2024-12-18 21:47     ` Keith Seitz
2024-12-20 16:15   ` Tom Tromey
2024-12-20 18:18     ` Keith Seitz [this message]
2024-12-20 18:26       ` Tom Tromey
2024-12-20 20:47         ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c762df11-4a3b-4dfc-b8a7-249987ace464@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox