From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DKAnLLb8qGErUgAAWB0awg (envelope-from ) for ; Thu, 02 Dec 2021 12:04:54 -0500 Received: by simark.ca (Postfix, from userid 112) id 9BB131F0CF; Thu, 2 Dec 2021 12:04:54 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 EA14E1EDEE for ; Thu, 2 Dec 2021 12:04:53 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 043EF385C41B for ; Thu, 2 Dec 2021 17:04:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 043EF385C41B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1638464693; bh=c42O10MUcd0w9i2jEW3a8bpbBM7WT9u0/NHlqJedgJM=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=NF63gYyvXzZFyS3DB+EXbLEZd1HLR9f4xF2hw+EidftNhdKXbgRjpNjsZeBxNjhda IXYpBh+oC0RNvzmMVqJ8ZZ7UyTOdoyKipkxyfCpdQIWv9+WXLYH57Fpe8e9SKneWZd jw8w3dU8DauI8a1dmwrPNiFSNRzCO/UVlyGvmzzg= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id E551D385AC36 for ; Thu, 2 Dec 2021 16:33:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E551D385AC36 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B2EoeGO009086; Thu, 2 Dec 2021 16:33:02 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cq08naguq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Dec 2021 16:33:02 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1B2GT8lf026135; Thu, 2 Dec 2021 16:33:01 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03dal.us.ibm.com with ESMTP id 3ckcade1nm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Dec 2021 16:33:01 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1B2GX0Z518284990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Dec 2021 16:33:00 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 937E4136071; Thu, 2 Dec 2021 16:32:59 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F527136059; Thu, 2 Dec 2021 16:32:59 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.124.5]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 2 Dec 2021 16:32:59 +0000 (GMT) Message-ID: Subject: Ping Re: [PATCH] gdb fix for catch-syscall.exp To: Simon Marchi , John Baldwin , gdb-patches@sourceware.org Date: Thu, 02 Dec 2021 08:32:58 -0800 In-Reply-To: References: <3b8e450b9fb4f4bec97a6bfbe6e6a4816be780ee.camel@us.ibm.com> <4d51616392553dd308672f65f18909ebf0513fc0.camel@us.ibm.com> <95fbffc3-8d30-6e75-4f52-f6e534a13b20@FreeBSD.org> <8269783078cecf5fe7fb7bea8d546256aafc7071.camel@us.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-16.el8) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mMQFt-gVMxiFaapgUc2BPqZI00scGUvn X-Proofpoint-ORIG-GUID: mMQFt-gVMxiFaapgUc2BPqZI00scGUvn Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-02_10,2021-12-02_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 adultscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020109 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" Simon: I sent the following two patches, the first to revert the change, the second to make the failures xfail. I haven't heard anything. Please let me know if the first patch to revert the test change is OK and I will commit that. We can then work more on deciding how to handle the failure, i.e. patch 2. Carl --------------------------------------------------- On Mon, 2021-11-29 at 08:46 -0800, Carl Love wrote: > Simon: > > I split the latest patch so there is a separate revert patch and a > patch to make the Powerepc test a xfail. Note, the revert patch only > reverts the part of the original patch that causes the regression > test > on amd64. > > Let me know if the first patch looks OK to commit to mainline. > > We can continue to discuss the second patch to decide if there is a > better implementation to add the xfail and if it really is a kernel > failure. > > Carl > -------------------------------------------------------------------- > [PATCH 1/2] gdb: Revert change to gdb.base/catch-syscall.exp > > The previous commit: > commit ab198279120fe7937c0970a8bb881922726678f9 > Author: Carl Love > Date: Wed Nov 17 22:29:33 2021 +0000 > > gdb fix for catch-syscall.exp > > Fixed the test failure on PowerPC but broke the test on amd64. The > issue is > both messages: > > Catchpoint 1 (call to syscall execve), .... > Catchpoint 1 (returned from syscall execve), .... > > are seen on amd64 whereas on PowerPC only the "call to syscall > execve" is > seen. Based on the discussion on the mailing list, it is felt that > this > is really an issue with the PowerPC kernel support not reporting both > events. > > This patch just reverts the part of the commit that caused the > regression > failure on amd64. The change for the istarget powerpc64-*-linux* is > not > being reverted. > --- > gdb/testsuite/gdb.base/catch-syscall.exp | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp > b/gdb/testsuite/gdb.base/catch-syscall.exp > index 016d0a698a6..cdd5e2aec47 100644 > --- a/gdb/testsuite/gdb.base/catch-syscall.exp > +++ b/gdb/testsuite/gdb.base/catch-syscall.exp > @@ -348,9 +348,7 @@ 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 that the execve is called. > - check_call_to_syscall "execve" > + check_continue "execve" > > # Continue to main so extended-remote can read files as needed. > # (Otherwise that "Reading" output confuses > gdb_continue_to_end.) > -- > 2.30.2 > > ------------------------------------------------------------------- > ---- > [PATCH 2/2] gdb: Powerpc mark xfail in gdb.base/catch-syscall.exp > > Powerpc is not reporting the > > Catchpoint 1 (returned from syscall execve), .... > > as expected. The issue appears to be with the kernel not returning > the > expected result. This patch marks the test failure as an xfail. > > See gdb bugzilla > https://sourceware.org/bugzilla/show_bug.cgi?id=28623 > --- > gdb/testsuite/gdb.base/catch-syscall.exp | 37 ++++++++++++++++++++ > ---- > 1 file changed, 31 insertions(+), 6 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp > b/gdb/testsuite/gdb.base/catch-syscall.exp > index cdd5e2aec47..0693f7afe27 100644 > --- a/gdb/testsuite/gdb.base/catch-syscall.exp > +++ b/gdb/testsuite/gdb.base/catch-syscall.exp > @@ -127,7 +127,24 @@ proc check_return_from_syscall { syscall { > pattern "" } } { > } > > set thistest "syscall $syscall has returned" > - gdb_test "continue" "Catchpoint $decimal \\(returned from > syscall ${pattern}\\).*" $thistest > + if { $pattern eq "execve" } { > + gdb_test_multiple "continue" $thistest { > + -re -wrap "Catchpoint $decimal \\(returned from syscall > ${pattern}\\).*" { > + pass $thistest > + return 1 > + } > + -re -wrap ".*Breakpoint $decimal, main .*" { > + # On Powerpc kernel does not report the returned from > syscall > + # as expected by the test. GDB bugzilla 28623. > + xfail $thistest > + return 0 > + } > + } > + > + } else { > + gdb_test "continue" "Catchpoint $decimal \\(returned from > syscall ${pattern}\\).*" $thistest > + return 1 > + } > } > > # Internal procedure that performs two 'continue' commands and > checks if > @@ -142,7 +159,11 @@ proc check_continue { syscall { pattern "" } } { > # Testing if the inferior has called the syscall. > check_call_to_syscall $syscall $pattern > # And now, that the syscall has returned. > - check_return_from_syscall $syscall $pattern > + if [check_return_from_syscall $syscall $pattern] { > + return 1 > + } else { > + return 0 > + } > } > > # Inserts a syscall catchpoint with an argument. > @@ -348,11 +369,15 @@ 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" > + if [check_continue "execve"] { > + # The check_continue test generates an XFAIL on > Powerpc. In > + # that case, gdb is already at main so don't do the > continue. > > - # Continue to main so extended-remote can read files as needed. > - # (Otherwise that "Reading" output confuses > gdb_continue_to_end.) > - gdb_continue "main" > + > + # Continue to main so extended-remote can read files as > needed. > + # (Otherwise that "Reading" output confuses > gdb_continue_to_end.) > + gdb_continue "main" > + } > > # Now can we finish? > check_for_program_end