2003-12-04 Andrew Cagney * 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; ${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" } } }