From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25117 invoked by alias); 6 Feb 2017 17:59:08 -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 24866 invoked by uid 89); 6 Feb 2017 17:59:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=H*f:sk:bf39103, H*MI:sk:bf39103, H*i:sk:bf39103, assurance X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Feb 2017 17:58:56 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1canZ0-0001Ln-RO from Luis_Gustavo@mentor.com ; Mon, 06 Feb 2017 09:58:54 -0800 Received: from [172.30.11.152] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 6 Feb 2017 09:58:51 -0800 Reply-To: Luis Machado Subject: Re: [PATCH] Make gdb.arch/i386-biarch-core.exp more robust References: <1485870927-12623-1-git-send-email-lgustavo@codesourcery.com> To: Pedro Alves , From: Luis Machado Message-ID: Date: Mon, 06 Feb 2017 17:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00128.txt.bz2 On 02/06/2017 11:28 AM, Pedro Alves wrote: > 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 You're right. The same message would've come out in a broken gdb trying to load the test core file. > > 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? > It should, because then gdb will recognize it. > 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" ... > Yes, indeed. This test should never try to force a gdb that doesn't understand i386/x86-64 core files to load one. > and seeing if something comes out. > > then only do "unsupported" if x86 is not supported, otherwise, > the memory read failure is really a fail. Right. In this case it was a fail because gdb didn't even load the core file. As opposed to failing to read from a core file memory segment. I'll adjust this.