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

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