Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH][gdb/testsuite] Fix gdb.tui/new-layout.exp with tcl 8.5
@ 2020-12-10 16:55 Tom de Vries
  2020-12-10 17:08 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2020-12-10 16:55 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Hi,

In commit 4d91ddd342 "[gdb/testsuite] Fix unbalanced braces in
gdb.tui/new-layout.exp", I tried to fix a problem with test-case
gdb.tui/new-layout.exp when running with tcl 8.5.

However, at that point I only had access to the log containing the failure,
and unfortunately my patch turned out not to be effective.

So, finally fix this problem by guarding the problematic code with:
...
if { [tcl_version_at_least 8 6] } { ... }
...

Tested on x86_64-linux, specifically SLE-11 where I ran into the failure.

Any comments?

Thanks,
- Tom

[gdb/testsuite] Fix gdb.tui/new-layout.exp with tcl 8.5

gdb/testsuite/ChangeLog:

2020-12-10  Tom de Vries  <tdevries@suse.de>

	PR testsuite/26947
	* gdb.tui/new-layout.exp: Don't execute tests with unbalanced curly
	braces for tcl 8.5 and earlier.

---
 gdb/testsuite/gdb.tui/new-layout.exp | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.tui/new-layout.exp b/gdb/testsuite/gdb.tui/new-layout.exp
index d736e7f42f..cd9b15bcd9 100644
--- a/gdb/testsuite/gdb.tui/new-layout.exp
+++ b/gdb/testsuite/gdb.tui/new-layout.exp
@@ -44,12 +44,16 @@ gdb_test "tui new-layout example src 1 src 1" \
     "Window \"src\" seen twice in layout"
 gdb_test "tui new-layout example src 1" \
     "New layout does not contain the \"cmd\" window"
-gdb_test "tui new-layout example src 1\}" \
-    "Extra '\}' in layout specification"
-gdb_test "tui new-layout example {src 1} 1\}" \
-    "Extra '\}' in layout specification"
-gdb_test "tui new-layout example \{src 1" \
-    "Missing '\}' in layout specification"
+
+# Avoid unbalanced curly braces problems with tcl 8.5.
+if { [tcl_version_at_least 8 6] } {
+    gdb_test "tui new-layout example src 1\}" \
+	"Extra '\}' in layout specification"
+    gdb_test "tui new-layout example {src 1} 1\}" \
+	"Extra '\}' in layout specification"
+    gdb_test "tui new-layout example \{src 1" \
+	"Missing '\}' in layout specification"
+}
 
 gdb_test_no_output "tui new-layout example asm 1 status 0 cmd 1"
 

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

* Re: [PATCH][gdb/testsuite] Fix gdb.tui/new-layout.exp with tcl 8.5
  2020-12-10 16:55 [PATCH][gdb/testsuite] Fix gdb.tui/new-layout.exp with tcl 8.5 Tom de Vries
@ 2020-12-10 17:08 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2020-12-10 17:08 UTC (permalink / raw)
  To: Tom de Vries; +Cc: Tom Tromey, gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> Tested on x86_64-linux, specifically SLE-11 where I ran into the failure.

Tom> Any comments?

It seems fine.  I wonder a little bit why the previous code didn't work,
but considering that it's an older version of Tcl, general dejagnu
weirdness, and finally the unusual nature of the test, I guess in the
end I think it's best not to dig too deeply.

Tom

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

end of thread, other threads:[~2020-12-10 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 16:55 [PATCH][gdb/testsuite] Fix gdb.tui/new-layout.exp with tcl 8.5 Tom de Vries
2020-12-10 17:08 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox