From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aZOVBdSQlWGgVgAAWB0awg (envelope-from ) for ; Wed, 17 Nov 2021 18:31:32 -0500 Received: by simark.ca (Postfix, from userid 112) id 059D61F0C1; Wed, 17 Nov 2021 18:31:32 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5D4AE1ECEB for ; Wed, 17 Nov 2021 18:31:31 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8F9433857C7B for ; Wed, 17 Nov 2021 23:31:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F9433857C7B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637191890; bh=Cs/npRjkkqzIOsGA3wqqeQ0P601HyRCIrgYicvP3JJ8=; h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=WhtnZjzZU8EWw9VnXgOxi7V6REtpW+tNE1C6Faa1xOcBdI+nwjCbV6zNW7SvTU720 LjOXQu4Cuw8RPilHFvqOox7I6ujmspQ+2Ky/7a/kIGWpRCOhvD/GyBAGbQQ8DUYTOM bqzFztcdr8jrpNfkwkE1lHepnhGVU48mqKTbNYAU= Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id E3942385AC31 for ; Wed, 17 Nov 2021 23:30:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3942385AC31 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AHMBX3a013358 for ; Wed, 17 Nov 2021 23:30:40 GMT Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cdaag14ky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 17 Nov 2021 23:30:40 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AHNCYZn018262 for ; Wed, 17 Nov 2021 23:30:39 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma01wdc.us.ibm.com with ESMTP id 3cd7c2nguj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 17 Nov 2021 23:30:39 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AHNUcHU53674444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Nov 2021 23:30:38 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85D7911206D; Wed, 17 Nov 2021 23:30:38 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A35F1112064; Wed, 17 Nov 2021 23:30:37 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.8.221]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 17 Nov 2021 23:30:37 +0000 (GMT) Message-ID: <3b8e450b9fb4f4bec97a6bfbe6e6a4816be780ee.camel@us.ibm.com> Subject: [PATCH] gdb fix for catch-syscall.exp To: gdb-patches@sourceware.org Date: Wed, 17 Nov 2021 15:30:36 -0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-16.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: aWSec5yxdODLCn240ZoXKcO1NGQY3U-V X-Proofpoint-ORIG-GUID: aWSec5yxdODLCn240ZoXKcO1NGQY3U-V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-17_09,2021-11-17_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 clxscore=1015 mlxlogscore=672 phishscore=0 malwarescore=0 bulkscore=0 mlxscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111170107 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Carl Love via Gdb-patches Reply-To: Carl Love Cc: Rogerio Alves Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" GDB maintainers: The following patch fixes three test failures and an expect error. The expect error ERROR: can't read "arch1": no such variable is the result of the if/else statement in proc test_catch_syscall_multi_arch not matching the power platform. The power platform, starting with Power 8, has "le" in the platform string to indicate a Little Endian system. The current expect string doesn't match the "le" in the name. The other three failures are the result of the execve instruction that starts executing the new program. The expect script is looking for the return from the execve command which doesn't occur since execve replaces the current process image. The patch was tested on a Power 10 LE system with no regressions. Please let me know if the patch is acceptable for mainline. Thanks. Carl ------------------------------------------------------------------- gdb fix for catch-syscall.exp Remove check_continue "execve" from Proc test_catch_syscall_execve. The check_continue proceedure checs that the command, execve, starts and checks for the return from the command. The execve command starts a new program and thus the return from the command causing the test to fail. The call to proc check_continue "execve" is removed and replaced with just the call to check_call_to_syscall "execve" to verify the command executed. The next test in proc test_catch_syscall_execve verifies that the new program started and hit the break point in main. Update the check for the PowerPC architecture. Power Little Endian systems include "le" in the name. The istarget "power64-*-linux*" check fails to match LE sytems. The expected string is updated to capture both Big Endian and Little Endian systems. Power 10 LE istarget prints as: powerpc64le-unknown-linux-gnu. This patch fixes three failures and the error: ERROR: can't read "arch1": no such variable Patch tested on Power 10 ppc64le GNU/Linux platform. --- gdb/testsuite/gdb.base/catch-syscall.exp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp index 811a92b0aea..8b496712df5 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -348,7 +348,9 @@ proc test_catch_syscall_execve {} { # Check for entry/return across the execve, making sure that the # syscall_state isn't lost when turning into a new process. insert_catch_syscall_with_arg "execve" - check_continue "execve" + + # check that the execve is called + check_call_to_syscall "execve" # Continue to main so extended-remote can read files as needed. # (Otherwise that "Reading" output confuses gdb_continue_to_end.) @@ -550,7 +552,7 @@ proc test_catch_syscall_multi_arch {} { set syscall2_name "write" set syscall_number 1 } elseif { [istarget "powerpc-*-linux*"] \ - || [istarget "powerpc64-*-linux*"] } { + || [istarget "powerpc64*-linux*"] } { set arch1 "powerpc:common" set arch2 "powerpc:common64" set syscall1_name "openat" -- 2.30.2