From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Cc: John Baldwin <jhb@freebsd.org>
Subject: [pushed] [gdb/testsuite] Fix tdlabel_re references
Date: Mon, 25 Mar 2024 09:56:19 +0100 [thread overview]
Message-ID: <20240325085619.16552-1-tdevries@suse.de> (raw)
Commit 467a34bb9e6 ("gdb tests: Allow for "LWP" or "process" in thread IDs
from info threads") introduces a new global variable tdlabel_re, but fails to
indicate it's global when used in procs in four test-cases.
Fix this by adding "global tdlabel_re".
Tested on aarch64-linux.
---
gdb/testsuite/gdb.multi/multi-target-thread-find.exp | 2 +-
gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp | 2 +-
gdb/testsuite/gdb.trace/report.exp | 2 ++
gdb/testsuite/gdb.trace/strace.exp | 1 +
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.multi/multi-target-thread-find.exp b/gdb/testsuite/gdb.multi/multi-target-thread-find.exp
index ee6df54b411..24d19d5041e 100644
--- a/gdb/testsuite/gdb.multi/multi-target-thread-find.exp
+++ b/gdb/testsuite/gdb.multi/multi-target-thread-find.exp
@@ -23,7 +23,7 @@ if {![multi_target_prepare]} {
}
proc test_thread_find {} {
- global decimal gdb_prompt
+ global decimal gdb_prompt tdlabel_re
set NUM_INFS 6
diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
index bd1acda4d90..9d121c5f439 100644
--- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
+++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
@@ -42,7 +42,7 @@ set target_binfile [gdb_remote_download target $binfile]
# Run the tests with different features of GDBserver disabled.
# TARGET_NON_STOP is passed to "maint set target-non-stop".
proc run_test { target_non_stop disable_feature } {
- global binfile gdb_prompt decimal hex
+ global binfile gdb_prompt decimal hex tdlabel_re
global GDBFLAGS
save_vars { GDBFLAGS } {
diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp
index a6e1650a02e..71465992778 100644
--- a/gdb/testsuite/gdb.trace/report.exp
+++ b/gdb/testsuite/gdb.trace/report.exp
@@ -173,6 +173,8 @@ gdb_test "help tdump" "Print everything collected at the current.*" \
# inferior and tfile.
proc use_collected_data { data_source } {
+ global tdlabel_re
+
with_test_prefix "${data_source}" {
global tdp1 tdp2 tdp3 tdp4 tdp5 tdp6
global testline1 testline2 testline3 testline4 testline5 testline6
diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp
index 730acda6489..99b199ef5f1 100644
--- a/gdb/testsuite/gdb.trace/strace.exp
+++ b/gdb/testsuite/gdb.trace/strace.exp
@@ -124,6 +124,7 @@ proc strace_info_marker { } {
global executable
global gdb_prompt
global libipa
+ global tdlabel_re
# Restart with a fresh gdb.
clean_restart $executable
base-commit: 121a4d3d8025b8619c5b0e189040c47a7815a0f1
--
2.35.3
next reply other threads:[~2024-03-25 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 8:56 Tom de Vries [this message]
2024-03-25 16:31 ` John Baldwin
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=20240325085619.16552-1-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
/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