[gdb/testsuite] Fix ERROR in gdb.ctf/funcreturn.exp
authorTom de Vries <tdevries@suse.de>
Sat, 4 Jun 2022 09:19:01 +0000 (11:19 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 4 Jun 2022 09:19:01 +0000 (11:19 +0200)
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.

gdb/testsuite/gdb.ctf/funcreturn.exp

index 8f2723bdb89503e55f41e91c26414ed016924583..fe4e045d0cee2813e360170ebcfce8a7360b8112 100644 (file)
@@ -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"