From patchwork Mon Oct 9 18:46:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 23418 Received: (qmail 13246 invoked by alias); 9 Oct 2017 18:46:31 -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 13236 invoked by uid 89); 9 Oct 2017 18:46:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 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=encouraged, H*o:GmbH, lift, feels X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Oct 2017 18:46:29 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v99IjIsq036408 for ; Mon, 9 Oct 2017 14:46:27 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2dgc1m8p4s-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 09 Oct 2017 14:46:27 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Oct 2017 19:46:26 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Oct 2017 19:46:24 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v99IkOSE25100332; Mon, 9 Oct 2017 18:46:24 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE36142041; Mon, 9 Oct 2017 19:42:08 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AD5964203F; Mon, 9 Oct 2017 19:42:08 +0100 (BST) Received: from oc1027705133.ibm.com (unknown [9.152.212.164]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 9 Oct 2017 19:42:08 +0100 (BST) From: Andreas Arnez To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] GDB test suite: Add helper for locating core files References: <1505760152-28775-1-git-send-email-arnez@linux.vnet.ibm.com> <1505760152-28775-2-git-send-email-arnez@linux.vnet.ibm.com> <20171007094545.1bba5c51@pinnacle.lan> Date: Mon, 09 Oct 2017 20:46:21 +0200 In-Reply-To: <20171007094545.1bba5c51@pinnacle.lan> (Kevin Buettner's message of "Sat, 7 Oct 2017 09:45:45 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17100918-0040-0000-0000-000003E107E2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100918-0041-0000-0000-000025E30830 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-09_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710090272 X-IsSubscribed: yes On Sat, Oct 07 2017, Kevin Buettner wrote: [...] > E.g. when I test your patch on my x86-64 linux box using the > following command... > > make check RUNTESTFLAGS="--target_board=native-gdbserver" > > ...I see 32 fewer passes than before and also one more known failure. > > Here are the passes that no longer occur when using your patch: [...] > Instead, several warnings are now printed instead: > > WARNING: Can not generate core dump on remote target. These warnings are newly introduced by the patch. They are meant to improve diagnostics when someone attempts to run the tests on a "real" remote target. I wanted to clearly document the fact that this is unsupported (and always was). Also, by documenting this restriction, maybe someone feels encouraged to lift it ;-) But it seems I went overboard, now also bailing out in case of native-gdbserver, which is unnecessary, since no extra handling is required for that. How to fix this, though? Rather than bailing out on "is_remote target", maybe we should check for "isnative" instead? See the delta-patch below. This should fix the problem with native-gdbserver and is probably not worse than before in other scenarios, so maybe it's good enough. WDYT? > If you can restore support for handling of remote core files, I'd very > much like to review this patch again. Thanks, I'd appreciate that. --- Andreas -- >8 -- Subject: [PATCH] Squash into "GDB test suite: Add helper for locating core files" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 2c5e94d..091933a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5850,7 +5850,7 @@ proc exec_in_dir {dir command} { # Return the core file's filename, or "", if none was found. proc run_and_get_core {binfile {arg ""}} { - if {[is_remote target]} { + if {![isnative]} { warning "Can not generate core dump on remote target." return "" } @@ -5883,7 +5883,7 @@ proc run_and_get_core {binfile {arg ""}} { # specified. Return that path name, or "" if no core file was found. proc find_core {binfile coredir {destcore ""}} { - if {[is_remote target]} { + if {![isnative]} { warning "Can not access remote core file." return "" }