From: Tom de Vries Date: Sat, 4 Jun 2022 09:19:01 +0000 (+0200) Subject: [gdb/testsuite] Fix ERROR in gdb.ctf/funcreturn.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c05610450e5f19f03245ac646587e35cab53e7b;p=binutils-gdb.git [gdb/testsuite] Fix ERROR in gdb.ctf/funcreturn.exp On openSUSE Tumbleweed (with gcc-12, enabling ctf tests) I run into: ... ERROR: tcl error sourcing src/gdb/testsuite/gdb.ctf/funcreturn.exp. ERROR: tcl error code NONE ERROR: Unexpected arguments: \ {print v_double_func} \ {[0-9]+ = {double \(\)} 0x[0-9a-z]+.*} \ {print double function} \ } ... The problem is a curly brace as fourth argument to gdb_test, which errors out due to recently introduced more strict argument checking in gdb_test. Fix the error by removing the brace. Though this fixes the error for me, due to PR29160 I get only FAILs, so I can't claim proper testing on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.ctf/funcreturn.exp b/gdb/testsuite/gdb.ctf/funcreturn.exp index 8f2723bdb89..fe4e045d0ce 100644 --- a/gdb/testsuite/gdb.ctf/funcreturn.exp +++ b/gdb/testsuite/gdb.ctf/funcreturn.exp @@ -106,14 +106,13 @@ if ![target_info exists no_long_long] { # Sun /bin/cc calls this a function returning double. if {!$gcc_compiled} then {setup_xfail "*-sun-sunos4*"} - gdb_test "print v_float_func" \ - "$decimal = \{float \\(\\)\} 0x\[0-9a-z\]+.*" \ - "print float function" +gdb_test "print v_float_func" \ + "$decimal = \{float \\(\\)\} 0x\[0-9a-z\]+.*" \ + "print float function" - gdb_test "print v_double_func" \ - "$decimal = \{double \\(\\)\} 0x\[0-9a-z\]+.*" \ - "print double function" \ -} +gdb_test "print v_double_func" \ + "$decimal = \{double \\(\\)\} 0x\[0-9a-z\]+.*" \ + "print double function" # test whatis command with functions return type gdb_test "whatis v_char_func" \ @@ -180,11 +179,10 @@ if ![target_info exists no_long_long] { # Sun /bin/cc calls this a function returning double. if {!$gcc_compiled} then {setup_xfail "*-sun-sunos4*"} - gdb_test "whatis v_float_func" \ - "type = float \\($void\\)" \ - "whatis float function" +gdb_test "whatis v_float_func" \ + "type = float \\($void\\)" \ + "whatis float function" - gdb_test "whatis v_double_func" \ - "type = double \\($void\\)" \ - "whatis double function" \ -} +gdb_test "whatis v_double_func" \ + "type = double \\($void\\)" \ + "whatis double function"