public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix ERROR in gdb.ctf/funcreturn.exp
@ 2022-06-04  9:19 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-06-04  9:19 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0c05610450e5f19f03245ac646587e35cab53e7b

commit 0c05610450e5f19f03245ac646587e35cab53e7b
Author: Tom de Vries <tdevries@suse.de>
Date:   Sat Jun 4 11:19:01 2022 +0200

    [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:
---
 gdb/testsuite/gdb.ctf/funcreturn.exp | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

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"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-04  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-04  9:19 [binutils-gdb] [gdb/testsuite] Fix ERROR in gdb.ctf/funcreturn.exp Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).