From: Simon Marchi <simark@simark.ca>
To: John Baldwin <jhb@FreeBSD.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH v3] gdb tests: Allow for "LWP" in thread IDs from info threads.
Date: Tue, 9 May 2023 15:01:13 -0400 [thread overview]
Message-ID: <10ba4b3e-19e0-2889-47de-67667db21af1@simark.ca> (raw)
In-Reply-To: <20230418201305.61272-1-jhb@FreeBSD.org>
On 4/18/23 16:13, John Baldwin wrote:
> Several tests assume that the first word after a thread ID in 'info
> threads' output is "Thread". However, several targets use "LWP"
> instead such as the FreeBSD and NetBSD native targets. The Linux
> native target also uses "LWP" if libthread_db is not being used.
>
> Add a tdlabel_re global variable as a regular-expression for a thread
> label in `info threads' that matches either "thread" or "LWP".
>
> Some other tests in the tree don't require a specific word, and
> some targets may use other first words (e.g. OpenBSD uses "thread"
> and Ravenscar threads use "Ravenscar Thread").
That LGTM, I don't really see another way:
Approved-By: Simon Marchi <simon.marchi@efficios.com>
One nit is that I prefer to use the ${::tdlabel_re} notation instead of
the global keyword, but it's not a dealbreaker.
And just one question:
> diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp
> index 14db2511d40..a5b7ccf4ba5 100644
> --- a/gdb/testsuite/gdb.trace/report.exp
> +++ b/gdb/testsuite/gdb.trace/report.exp
> @@ -380,7 +380,7 @@ proc use_collected_data { data_source } {
>
> # There is always a thread of an inferior, either a live one or
> # a faked one.
> - gdb_test "info threads" "\\* ${decimal} (process|Thread) \[0-9\.\]+\[ \t\].*"
> + gdb_test "info threads" "\\* ${decimal} ${tdlabel_re} \[0-9\.\]+\[ \t\].*"
This one said "process" as well, I guess it's not important?
Simon
next prev parent reply other threads:[~2023-05-09 19:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 20:13 John Baldwin
2023-05-08 16:19 ` [PING] " John Baldwin
2023-05-09 19:01 ` Simon Marchi [this message]
2023-05-09 20:56 ` John Baldwin
2023-05-12 14:15 ` John Baldwin
2023-05-26 17:51 ` John Baldwin
2023-06-09 16:56 ` John Baldwin
2023-06-30 14:21 ` [PING] " John Baldwin
2023-07-14 15:35 ` John Baldwin
2024-03-22 20:58 ` John Baldwin
2024-03-26 12:19 ` Pedro Alves
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=10ba4b3e-19e0-2889-47de-67667db21af1@simark.ca \
--to=simark@simark.ca \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).