From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111403 invoked by alias); 6 Feb 2017 17:28:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 111388 invoked by uid 89); 6 Feb 2017 17:28:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=assurance, complains, wrongly X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Feb 2017 17:28:30 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7477E80F63; Mon, 6 Feb 2017 17:28:30 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v16HSS5s018134; Mon, 6 Feb 2017 12:28:28 -0500 Subject: Re: [PATCH] Make gdb.arch/i386-biarch-core.exp more robust To: Luis Machado , gdb-patches@sourceware.org References: <1485870927-12623-1-git-send-email-lgustavo@codesourcery.com> From: Pedro Alves Message-ID: Date: Mon, 06 Feb 2017 17:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1485870927-12623-1-git-send-email-lgustavo@codesourcery.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00126.txt.bz2 On 01/31/2017 01:55 PM, Luis Machado wrote: > This test attempts to load a x86 core file no matter what the target > architecture is. If the architecture is not x86, GDB will not recognize > the core file and therefore won't have any memory to inspect. All we will > have is a memory read error, resulting in a FAIL. > > The following patch addresses this by checking if we successfully loaded > the core file. If not, just return. Otherwise it keeps testing. > > gdb/testsuite/ChangeLog: > > 2017-01-31 Luis Machado > > * gdb.arch/i386-biarch-core.exp: Return if core file was not > recognized. This seems to contradict a bit the point of the test, which says: > # Test if at least the core file segments memory has been loaded. when: > # Wrongly built GDB complains by: > # "..." is not a core dump: File format not recognized I.e., would we be potentially losing coverage? Assurance that we're not I think should be part of the rationale for this change. Does the test pass for you if your non --target=x86 build ends up including x86 support, with e.g., --enable-targets=all? If it does, then maybe we should check whether the GDB build supports x86, by e.g., doing: gdb_test_multiple "complete set architecture i386" ... and seeing if something comes out. then only do "unsupported" if x86 is not supported, otherwise, the memory read failure is really a fail. Thanks, Pedro Alves