From patchwork Fri Jan 19 19:03:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 25463 Received: (qmail 114419 invoked by alias); 19 Jan 2018 19:03:56 -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 114388 invoked by uid 89); 19 Jan 2018 19:03:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Jan 2018 19:03:54 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0JJ3gcl085989 for ; Fri, 19 Jan 2018 14:03:53 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fkkj07cx5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 19 Jan 2018 14:03:52 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Jan 2018 19:03:50 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 19 Jan 2018 19:03:48 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0JJ3l5t39649290 for ; Fri, 19 Jan 2018 19:03:47 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 651964C040 for ; Fri, 19 Jan 2018 18:57:56 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A3824C04A for ; Fri, 19 Jan 2018 18:57:56 +0000 (GMT) Received: from oc1027705133.ibm.com (unknown [9.152.212.155]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS for ; Fri, 19 Jan 2018 18:57:56 +0000 (GMT) From: Andreas Arnez To: gdb-patches@sourceware.org Subject: [pushed] S390: Fix infcalls in s390-vregs test case Date: Fri, 19 Jan 2018 20:03:45 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18011919-0040-0000-0000-00000426C0F0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011919-0041-0000-0000-000020CA3ACA Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-19_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801190248 X-IsSubscribed: yes GDB used to assume that functions without debug info return int. It accepted an expression containing such a function call and silently interpreted the function's return value as int. But nowadays GDB yields an error message instead, see https://sourceware.org/ml/gdb-patches/2017-07/msg00139.html This affects the s390-vregs test case, because it contains calls to setrlimit64 and chdir. When no glibc debug info is installed, these lead to unnecessary FAILs. Fix this by adding appropriate casts to the inferior function calls. gdb/testsuite/ChangeLog: * gdb.arch/s390-vregs.exp: Explicitly cast the return values of setrlimit and chdir to int. --- gdb/testsuite/gdb.arch/s390-vregs.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.arch/s390-vregs.exp b/gdb/testsuite/gdb.arch/s390-vregs.exp index 915fcfc..1fdb5c0 100644 --- a/gdb/testsuite/gdb.arch/s390-vregs.exp +++ b/gdb/testsuite/gdb.arch/s390-vregs.exp @@ -83,9 +83,9 @@ if [expr $before_pc + 6 != $after_pc] { # directory. if { $coredir != "" } { - gdb_test {print setrlimit (4, &(unsigned long [2]){~0UL, ~0UL})} \ + gdb_test {print (int) setrlimit (4, &(unsigned long [2]){~0UL, ~0UL})} \ " = .*" "setrlimit" - gdb_test "print chdir (\"${coredir}\")" " = 0" "chdir" + gdb_test "print (int) chdir (\"${coredir}\")" " = 0" "chdir" } # Initialize all vector registers with GDB "set" commands, using