Blame SOURCES/gdb-rhbz1182151-ibm-z13-22of22.patch

01917d
commit fd356fa28834fa3a9f22f9157a568264ad045010
01917d
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
01917d
Date:   Wed Jan 20 19:41:45 2016 +0100
01917d
01917d
    gnu_vector.exp: Respect `should_kfail' for PR 8549
01917d
    
01917d
    The gnu_vector test case yields a new FAIL on s390x:
01917d
    
01917d
      FAIL: gdb.base/gnu_vector.exp: verify vector return value
01917d
    
01917d
    It was introduced by commit 77ae9c1933b50 "gdb.base/gnu_vector.exp:
01917d
    Don't test output from the inferior".  That commit dropped the special
01917d
    handling for GDB's inability (on some targets) to set the return value.
01917d
    
01917d
    This change re-establishes the logic from before, converting the above
01917d
    FAIL to a KFAIL (PRMS gdb/8549).
01917d
    
01917d
    gdb/testsuite/ChangeLog:
01917d
    
01917d
    	* gdb.base/gnu_vector.exp: Re-establish handling for should_kfail
01917d
    	when GDB can not set the vector return value.  Add more comments
01917d
    	for clarification.
01917d
01917d
### a/gdb/testsuite/ChangeLog
01917d
### b/gdb/testsuite/ChangeLog
01917d
## -1,3 +1,9 @@
01917d
+2016-01-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
01917d
+
01917d
+	* gdb.base/gnu_vector.exp: Re-establish handling for should_kfail
01917d
+	when GDB can not set the vector return value.  Add more comments
01917d
+	for clarification.
01917d
+
01917d
 2016-01-20  Antoine Tremblay  <antoine.tremblay@ericsson.com>
01917d
 
01917d
 	* gdb.trace/tspeed.exp:  Use shlib instead of libs in gdb_compile
01917d
--- a/gdb/testsuite/gdb.base/gnu_vector.exp
01917d
+++ b/gdb/testsuite/gdb.base/gnu_vector.exp
01917d
@@ -230,6 +230,7 @@ gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test {
01917d
 	pass $test
01917d
     }
01917d
     -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" {
01917d
+	# This happens, e.g., on s390x unless using the vector ABI.
01917d
 	set should_kfail 1
01917d
 	exp_continue
01917d
     }
01917d
@@ -240,4 +241,18 @@ gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test {
01917d
 }
01917d
 
01917d
 gdb_test "next" ""
01917d
-gdb_test "p res" "\\{4, 2, 7, 6\\}.*" "verify vector return value"
01917d
+set test "verify vector return value"
01917d
+gdb_test_multiple "p res" $test {
01917d
+    -re ".*= \\{4, 2, 7, 6\\}\r\n.*$gdb_prompt $" {
01917d
+	pass $test
01917d
+    }
01917d
+    -re ".*= \\{.*\\}\r\n.*$gdb_prompt $" {
01917d
+	if { $should_kfail } {
01917d
+	    # GDB had not actually set the return value, likely due to
01917d
+	    # PR 8549.  So accept any return value and emit a KFAIL.
01917d
+	    kfail "gdb/8549" $test
01917d
+	} else {
01917d
+	    fail $test
01917d
+	}
01917d
+    }
01917d
+}