From: Tom de Vries Date: Wed, 17 Sep 2025 04:53:14 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix gdb.go X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1be1e478b148c46d05b454c618e4c909361639fd;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix gdb.go Running tclint on the test-cases in gdb.go shows a few problems. Fix these. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.go/basic-types.exp b/gdb/testsuite/gdb.go/basic-types.exp index 3d4bfd50826..53ce4fa420c 100644 --- a/gdb/testsuite/gdb.go/basic-types.exp +++ b/gdb/testsuite/gdb.go/basic-types.exp @@ -25,7 +25,7 @@ require allow_go_tests proc test_integer_literal_types_accepted {} { # Test various decimal values. - gdb_test "pt 123" "type = int" + gdb_test "pt 123" "type = int" gdb_test "pt void(42)" "type = void" gdb_test "pt byte(42)" "type = uint8" @@ -102,7 +102,7 @@ proc test_complex_literal_types_accepted {} { clean_restart -if [set_lang_go] { +if {[set_lang_go]} { test_integer_literal_types_accepted test_logical_literal_types_accepted test_character_literal_types_accepted diff --git a/gdb/testsuite/gdb.go/integers.exp b/gdb/testsuite/gdb.go/integers.exp index d58c7716dcc..50ea9a88827 100644 --- a/gdb/testsuite/gdb.go/integers.exp +++ b/gdb/testsuite/gdb.go/integers.exp @@ -44,9 +44,9 @@ gdb_test "print i" ".* = 0" "print i before assigned to 1" gdb_test "next" "i = 1" "next to 'i = 1' line" gdb_test "next" "j = 2" "next to 'j = 2' line" -# At that point, +# At that point, # i should be equal to 1 -gdb_test "print i" " = 1" +gdb_test "print i" " = 1" # but j should still be equal to zero gdb_test "print j" " = 0" "test j value before assignment" diff --git a/gdb/testsuite/gdb.go/package.exp b/gdb/testsuite/gdb.go/package.exp index c30b8c01b70..180b48aecdc 100644 --- a/gdb/testsuite/gdb.go/package.exp +++ b/gdb/testsuite/gdb.go/package.exp @@ -27,7 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.go" "${binfile}2.o" object untested "failed to compile" return -1 } - + if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.go ${binfile}2.o" "${binfile}" executable "debug go libdir=[standard_output_file {}]"] != "" } { untested "failed to compile" return -1 diff --git a/gdb/testsuite/gdb.go/print.exp b/gdb/testsuite/gdb.go/print.exp index 85cb6a1009f..a02b7460b87 100644 --- a/gdb/testsuite/gdb.go/print.exp +++ b/gdb/testsuite/gdb.go/print.exp @@ -58,7 +58,7 @@ proc test_float_rejected {} { clean_restart -if [set_lang_go] { +if {[set_lang_go]} { test_float_accepted test_float_rejected } else {