public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: fix gdb.python/py-unwind.exp with python >= 3.11
@ 2023-06-21 22:11 Ilya Leoshkevich
  2023-06-22 14:10 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Leoshkevich @ 2023-06-21 22:11 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches, Ilya Leoshkevich

Python 3.11 changed the AttributeError message - see commit
0cb765b2cec9 ("bpo-46730: Add more info to @property AttributeError
messages (GH-31311)").  Add the new message to the expectations.
---
 gdb/testsuite/gdb.python/py-unwind.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
index e7c4c23dae2..807f63d5089 100644
--- a/gdb/testsuite/gdb.python/py-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
@@ -105,9 +105,11 @@ check_info_unwinder "info unwinder after failed disable" on
 # unwider.  Doing this is bad as the new name might clash with an
 # already registered name, which violates the promises made during
 # 'register_unwinder'.
+set pattern_1 "can't set attribute(?: 'name')?"
+set pattern_2 "property 'name' of 'TestUnwinder' object has no setter"
 gdb_test "python global_test_unwinder.name = \"foo\"" \
     [multi_line \
-	 "AttributeError: can't set attribute(?: 'name')?" \
+	 "AttributeError: (?:${pattern_1}|${pattern_2})" \
 	 "Error while executing Python code\\."]
 check_info_unwinder "info unwinder after failed name change" on
 
-- 
2.40.1


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

* Re: [PATCH] gdb/testsuite: fix gdb.python/py-unwind.exp with python >= 3.11
  2023-06-21 22:11 [PATCH] gdb/testsuite: fix gdb.python/py-unwind.exp with python >= 3.11 Ilya Leoshkevich
@ 2023-06-22 14:10 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2023-06-22 14:10 UTC (permalink / raw)
  To: Ilya Leoshkevich via Gdb-patches; +Cc: Andrew Burgess, Ilya Leoshkevich

>>>>> "Ilya" == Ilya Leoshkevich via Gdb-patches <gdb-patches@sourceware.org> writes:

Ilya> Python 3.11 changed the AttributeError message - see commit
Ilya> 0cb765b2cec9 ("bpo-46730: Add more info to @property AttributeError
Ilya> messages (GH-31311)").  Add the new message to the expectations.

Thank you, this is ok.
Approved-By: Tom Tromey <tom@tromey.com>


Tom

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

end of thread, other threads:[~2023-06-22 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 22:11 [PATCH] gdb/testsuite: fix gdb.python/py-unwind.exp with python >= 3.11 Ilya Leoshkevich
2023-06-22 14:10 ` Tom Tromey

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