From patchwork Wed Jan 20 11:48:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 10481 Received: (qmail 8438 invoked by alias); 20 Jan 2016 11:48:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 8386 invoked by uid 89); 20 Jan 2016 11:48:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=n*, inability, 2404, gnu_vector.exp X-HELO: e06smtp08.uk.ibm.com Received: from e06smtp08.uk.ibm.com (HELO e06smtp08.uk.ibm.com) (195.75.94.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 20 Jan 2016 11:48:29 +0000 Received: from localhost by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Jan 2016 11:48:25 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp08.uk.ibm.com (192.168.101.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 20 Jan 2016 11:48:20 -0000 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id F16C7219005E for ; Wed, 20 Jan 2016 11:48:07 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0KBmJcd9175480 for ; Wed, 20 Jan 2016 11:48:19 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0KBmJur027474 for ; Wed, 20 Jan 2016 04:48:19 -0700 Received: from oc1027705133.ibm.com (dyn-9-152-212-188.boeblingen.de.ibm.com [9.152.212.188]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u0KBmIb8027438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2016 04:48:19 -0700 From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Yao Qi Subject: [PATCH v2] gnu_vector.exp: Respect `should_kfail' for PR8549 Date: Wed, 20 Jan 2016 12:48:18 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16012011-0033-0000-0000-00000572DE6C X-IsSubscribed: yes Version 1: https://sourceware.org/ml/gdb-patches/2016-01/msg00437.html Changes since previous version: * When verifying the return value, accept any result if the specified return value had been ignored before. * Add comments where `should_kfail' is set and evaluated. -- 8< --------------------------------------------------------------- Subject: [PATCH v2] gnu_vector.exp: Respect `should_kfail' for PR8549 The gnu_vector test case yields a new FAIL on s390x: FAIL: gdb.base/gnu_vector.exp: verify vector return value It was introduced by commit 77ae9c1933b50 "gdb.base/gnu_vector.exp: Don't test output from the inferior". That commit dropped the special handling for GDB's inability (on some targets) to set the return value. This change re-establishes the logic from before, converting the above FAIL to a KFAIL (PRMS gdb/8549). gdb/testsuite/ChangeLog: * gdb.base/gnu_vector.exp: Re-establish handling for should_kfail when GDB can not set the vector return value. Add more comments for clarification. --- gdb/testsuite/gdb.base/gnu_vector.exp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/gnu_vector.exp b/gdb/testsuite/gdb.base/gnu_vector.exp index 6414afd..b934d67 100644 --- a/gdb/testsuite/gdb.base/gnu_vector.exp +++ b/gdb/testsuite/gdb.base/gnu_vector.exp @@ -230,6 +230,7 @@ gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test { pass $test } -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" { + # This happens, e.g., on s390x unless using the vector ABI. set should_kfail 1 exp_continue } @@ -240,4 +241,18 @@ gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test { } gdb_test "next" "" -gdb_test "p res" "\\{4, 2, 7, 6\\}.*" "verify vector return value" +set test "verify vector return value" +gdb_test_multiple "p res" $test { + -re ".*= \\{4, 2, 7, 6\\}\r\n.*$gdb_prompt $" { + pass $test + } + -re ".*= \\{.*\\}\r\n.*$gdb_prompt $" { + if { $should_kfail } { + # GDB had not actually set the return value, likely due to + # PR8549. So accept any return value and emit a KFAIL. + kfail "gdb/8549" $test + } else { + fail $test + } + } +}