From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 037323858407 for ; Sat, 5 Nov 2022 14:39:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 037323858407 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0FDF41F383; Sat, 5 Nov 2022 14:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1667659151; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5MmumiJI792Aj5ImGOjGO09W7tzePvM8rY5K1YyzJF0=; b=SuGRKIIkUefywvtZdeY8Maro5/S4s4+JmqltyP80n2i1Hx3kDFGRTKY0Nas7q+TBCSm6f9 kwDK0e2tGduHpVlwdzA3Msbizb3t6ZtpsfzgtAmOuie63YzvFTF4JrFn0DmWBjWzIOh3c2 ri+qQNYWxCd9fd6NlVq6l3Pe5o1DMFo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1667659151; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5MmumiJI792Aj5ImGOjGO09W7tzePvM8rY5K1YyzJF0=; b=oTbiqdRg7aOYjaT457Hyt5fgJbUdyhw4PWEEfo5qGwILMzvuOvyKAAr3lQbQCR80g8Ysx+ aUmIUDVMeHSqR5AQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E8F3413AA6; Sat, 5 Nov 2022 14:39:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 72SxN451ZmN7OgAAMHmgww (envelope-from ); Sat, 05 Nov 2022 14:39:10 +0000 Message-ID: <981b7f0c-690a-5cbc-738e-fd98b5f9b4f2@suse.de> Date: Sat, 5 Nov 2022 15:39:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 0/7] introduce get_runtime_path Content-Language: en-US To: Andrew Burgess , Ivan Tetyushkin , gdb-patches@sourceware.org References: <20221025162946.727169-1-ivan.tetyushkin@syntacore.com> <87czabc7f7.fsf@redhat.com> From: Tom de Vries In-Reply-To: <87czabc7f7.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/29/22 11:20, Andrew Burgess via Gdb-patches wrote: > Ivan Tetyushkin writes: > >> Hi. I tried to run a testsuite using a remote host test setup on QEMU >> (RISC-V) with Linux. > > Thanks for looking at these problems. I suspect the setup you are using > is not one that is used very often. > > Could you give more details about your setup so that others might be > able to reproduce the issues you are seeing, and validate your fixes? > Hi, I found a fairly easy way to reproduce this (after reading the response to Andrews question and realizing that given the use of --target_board rather than --host_board, from the point of view of dejagnu, this is not a remote host, but a remote target setup). Add a local test account remote-target, and put a remote-target entry in the .ssh/config: ... Host remote-target HostName 127.0.0.1 User remote-target IdentityFile IdentitiesOnly yes PreferredAuthentications publickey ... such that we can access it without password: ... $ ssh remote-target Last login: Sat Nov 5 15:12:34 2022 from 127.0.0.1 Have a lot of fun... remote-target@127.0.0.1:~> ... and likewise for remote-target@remote-target. Edit remote-gdbserver-on-localhost.exp to use the remote-target account: ... set_board_info rcp_prog "/usr/bin/scp" set_board_info rsh_prog "/usr/bin/ssh" set_board_info protocol standard -set_board_info username $env(USER) -set_board_info hostname localhost +set_board_info username remote-target +set_board_info hostname remote-target proc ${board}_spawn { board cmd } { global board_info ... Run test-case gdb.base/print-file-var.exp with target board remote-gdbserver-on-localhost.exp, and watch it pass. Now make sure the remote-target account cannot access files from the $USER account (well, as far as the testsuite output dir is concerned): ... $ chmod go-rx build/gdb/testsuite/outputs/ ... mimicking an actual remote target machine not being able to access the files on the build/host machine. Run the test again, and watch it fail. Now apply the patch series, and watch it pass again. Thanks, - Tom