public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: make gdb_get_worker_threads reads default number of threads
@ 2023-12-05 15:26 Guinevere Larsen
  2023-12-05 21:45 ` Keith Seitz
  2023-12-06 15:39 ` Tom Tromey
  0 siblings, 2 replies; 7+ messages in thread
From: Guinevere Larsen @ 2023-12-05 15:26 UTC (permalink / raw)
  To: gdb-patches; +Cc: Guinevere Larsen

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-06 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 15:26 [PATCH] gdb/testsuite: make gdb_get_worker_threads reads default number of threads Guinevere Larsen
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

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).