From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7eyoM1Dlc2L5eQQAWB0awg (envelope-from ) for ; Thu, 05 May 2022 10:55:12 -0400 Received: by simark.ca (Postfix, from userid 112) id C79CD1E058; Thu, 5 May 2022 10:55:12 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Xwf3IGau; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 4C8EA1E00E for ; Thu, 5 May 2022 10:55:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B22D4385780C for ; Thu, 5 May 2022 14:55:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B22D4385780C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651762511; bh=hXH/20eSIQwBf+I05v4dWLVDcRzzgEe8eU325IFczqQ=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Xwf3IGausWtCYEzsTh2R56+sssQLSuR9upTT2itPhisbCO8JT0cXgFTCg8sJITWLb GU8xQ8LTXTZFbQrLdWvDIa1YCzuR1mpu8h/zby/eqVpJ8Yxq9t1n8poKf2A/O3tmkc E3nAoYcg6RS2xGqSnLqqfXkvU4DK1GY7NyZlCTvM= Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id 370563858D3C for ; Thu, 5 May 2022 14:54:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 370563858D3C Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 13DCD3C17FF; Thu, 5 May 2022 10:54:51 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id sY0i2_6GEA3Y; Thu, 5 May 2022 10:54:50 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 9678A3C17FE; Thu, 5 May 2022 10:54:50 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 9678A3C17FE X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id u1PZ6oarqai2; Thu, 5 May 2022 10:54:50 -0400 (EDT) Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by mail.efficios.com (Postfix) with ESMTPSA id 604843C15E5; Thu, 5 May 2022 10:54:50 -0400 (EDT) Message-ID: Date: Thu, 5 May 2022 10:54:49 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] gdb: make regcache's cooked_write_test selftest work with native-extended-gdbserver board Content-Language: tl To: Pedro Alves , gdb-patches@sourceware.org References: <20220505140930.1087179-1-simon.marchi@efficios.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-05-05 10:38, Pedro Alves wrote: > On 2022-05-05 15:09, Simon Marchi via Gdb-patches wrote: >> Running >> >> $ make check TESTS="gdb.gdb/unittest.exp" RUNTESTFLAGS="--target_board=native-extended-gdbserver" >> >> I get some failures: >> >> Running selftest regcache::cooked_write_test::i386.^M >> Self test failed: target already pushed^M >> Running selftest regcache::cooked_write_test::i386:intel.^M >> Self test failed: target already pushed^M >> Running selftest regcache::cooked_write_test::i386:x64-32.^M >> Self test failed: target already pushed^M >> Running selftest regcache::cooked_write_test::i386:x64-32:intel.^M >> Self test failed: target already pushed^M >> Running selftest regcache::cooked_write_test::i386:x86-64.^M >> Self test failed: target already pushed^M >> Running selftest regcache::cooked_write_test::i386:x86-64:intel.^M >> Self test failed: target already pushed^M >> Running selftest regcache::cooked_write_test::i8086.^M >> Self test failed: target already pushed^M >> >> This is because the native-extended-gdbserver automatically connects GDB >> to a GDBserver on startup, and therefore pushes a remote target on the >> initial inferior. cooked_write_test is currently written in a way that >> errors out if the current inferior has a process_stratum_target pushed. >> >> Rewrite it to use scoped_mock_context, so it doesn't depend on the >> current inferior (the current one upon entering the function). >> >> Change-Id: I0357f989eacbdecc4bf88b043754451b476052ad > > OK. Pushed, thanks. Simon