This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch/rfc] more structs.exp kfails



The attatched tweaks structs.exp so that it KFAILs the case where a "return struct" fails because the target hasn't implemented the relevant code.


Jeff and I were puzzling over an apparent regression in the ia64 - this better clasifies it as something that is known to have never worked.

So, jeff, if it works for you, I'll commit it in a day or so,
Andrew
2003-12-04  Andrew Cagney  <cagney@redhat.com>

	* gdb.base/structs.exp (test_struct_returns): When applicable, set
	"return_value_unimplemented".  When an unimplemented struct return
	architecture, report incorrect values as a KFAIL

Index: testsuite/gdb.base/structs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v
retrieving revision 1.12
diff -u -r1.12 structs.exp
--- testsuite/gdb.base/structs.exp	27 Nov 2003 20:40:52 -0000	1.12
+++ testsuite/gdb.base/structs.exp	4 Dec 2003 16:07:14 -0000
@@ -299,6 +299,7 @@
 
     set test "return foo<n>; ${tests}"
     set return_value_unknown 0
+    set return_value_unimplemented 0
     gdb_test_multiple "return foo${n}" "${test}" {
 	-re "The location" {
 	    # Ulgh, a struct return, remember this (still need prompt).
@@ -307,10 +308,10 @@
 	}
 	-re "A structure or union" {
 	    # Ulgh, a struct return, remember this (still need prompt).
-	    # Set it to something unique so that it won't match a
-	    # struct return convention value.
-	    # set return_value_unknown -1
 	    set return_value_unknown 1
+	    # Double ulgh.  Architecture doesn't use return_value and
+	    # hence hasn't implemented small structure return.
+	    set return_value_unimplemented 1
 	    exp_continue
 	}
 	-re "Make fun${n} return now.*y or n. $" {
@@ -353,6 +354,15 @@
 		# This contradicts the above claim that GDB knew
 		# the location of the return-value.
 		fail "${test}"
+	    }
+	}
+	-re ".*${gdb_prompt} $" {
+	    if $return_value_unimplemented {
+		# What a suprize.  The architecture hasn't implemented
+		# return_value, and hence has to fail.
+		kfail "$test" gdb/1444
+	    } else {
+		fail "$test"
 	    }
 	}
     }	

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]