From 4d91ddd342b507a177fb84b73fdb6c0403323f79 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 16 Sep 2020 10:57:17 +0200 Subject: [PATCH] [gdb/testsuite] Fix unbalanced braces in gdb.tui/new-layout.exp On SLE-11 with tcl version 8.5, we run into: ... UNRESOLVED: gdb.tui/new-layout.exp: testcase aborted due to \ invalid command name: } ERROR: Couldn't send tui new-layout example src 1} to GDB. ... Apparently tcl 8.6 is more forgiving about unbalanced braces. Expose the unbalanced braces on tcl 8.6 by temporarily wrapping the test-case in: ... proc do_this { args } { uplevel 1 {*}$args } do_this { ... } ... and escape them using a backslash. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-09-16 Tom de Vries PR testsuite/26618 * gdb.tui/new-layout.exp: Escape unbalanced braces. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.tui/new-layout.exp | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0438760080d..5e3125cdd45 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-09-16 Tom de Vries + + PR testsuite/26618 + * gdb.tui/new-layout.exp: Escape unbalanced braces. + 2020-09-15 Tom Tromey PR rust/26197: diff --git a/gdb/testsuite/gdb.tui/new-layout.exp b/gdb/testsuite/gdb.tui/new-layout.exp index b4fca674e89..57c3f75e3b4 100644 --- a/gdb/testsuite/gdb.tui/new-layout.exp +++ b/gdb/testsuite/gdb.tui/new-layout.exp @@ -42,12 +42,12 @@ 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" +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" -- 2.30.2