public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Guinevere Larsen <blarsen@redhat.com>
To: gdb-patches@sourceware.org
Cc: Guinevere Larsen <blarsen@redhat.com>
Subject: [PATCH] gdb/testsuite: make gdb_get_worker_threads reads default number of threads
Date: Tue,  5 Dec 2023 16:26:09 +0100	[thread overview]
Message-ID: <20231205152609.741237-1-blarsen@redhat.com> (raw)

When a test in the testsuite attempts to collect the amount of worker
threads GDB is able to use, it calls the proc gdb_get_worker_threads,
which could understand if the number was unlimited or when it had been
explicitly defined to a number, but it was unable to understand the
default message. That lead to the following TCL error in some
situations:

ERROR: -------------------------------------------
ERROR: in testcase <path>
ERROR:  invalid bareword "UNKNOWN"
in expression "UNKNOWN / 2";
should be "$UNKNOWN" or "{UNKNOWN}" or "UNKNOWN(...)" or ...
(...)

One such example is the current buildbot instance (at least the clang
version). This commit adds a new clause to the gdb_get_worker_threads
that detects the default worker thread message.
---
 gdb/testsuite/lib/gdb.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d0990dcfe0e..148476cf42d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -10034,6 +10034,9 @@ proc gdb_get_worker_threads { {testname ""} } {
 	-wrap -re "^The number of worker threads GDB can use is unlimited \\(currently ($::decimal)\\)\\." {
 	    set worker_threads $expect_out(1,string)
 	}
+	-wrap -re "^The number of worker threads GDB can use is the default \\(currently ($::decimal)\\)\\." {
+	    set worker_threads $expect_out(1,string)
+	}
 	-wrap -re "^The number of worker threads GDB can use is ($::decimal)\\." {
 	    set worker_threads $expect_out(1,string)
 	}
-- 
2.41.0


             reply	other threads:[~2023-12-05 15:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 15:26 Guinevere Larsen [this message]
2023-12-05 21:45 ` Keith Seitz
2023-12-06 16:22   ` Andrew Burgess
2023-12-06 16:35     ` Tom de Vries
2023-12-06 15:39 ` Tom Tromey
2023-12-06 15:44   ` Guinevere Larsen
2023-12-06 16:33     ` Richard Bunt

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=20231205152609.741237-1-blarsen@redhat.com \
    --to=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.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).