From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id juleIlTILWPR1D4AWB0awg (envelope-from ) for ; Fri, 23 Sep 2022 10:53:08 -0400 Received: by simark.ca (Postfix, from userid 112) id 805311E112; Fri, 23 Sep 2022 10:53:08 -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=JcY+yHMF; 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=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 2F1DA1E0D3 for ; Fri, 23 Sep 2022 10:53:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 679283857030 for ; Fri, 23 Sep 2022 14:53:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 679283857030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663944787; bh=5E/TScaJXV9d241fcvn21Cpmzx5Qid5NAvCyIVNAfqM=; 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=JcY+yHMF0GQOeqKUeJgnKMdkqP00ISEFGH97QIiVheCWM2TxSR1u+ut/m+FPne84j Q2skMIdvxaC/VJq3G1VCN2s4RwgHzp+Pixf4/uAhE/o3jgu3rSWcoq++PdFG+LtLfD mqunUcpsWMP3Lcslcbo25ODP0Egur+bkz8+Tuacs= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 569CA3857B8D for ; Fri, 23 Sep 2022 14:51:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 569CA3857B8D Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D1F821E0D3; Fri, 23 Sep 2022 10:51:47 -0400 (EDT) Message-ID: <86aeaf80-204b-78dc-89b4-f1745bb75754@simark.ca> Date: Fri, 23 Sep 2022 10:51:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Running testsuite on QEMU (sorry if possible duplicate) Content-Language: en-US To: Konstantin Vladimirov , gdb@sourceware.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 2022-09-22 06:31, Konstantin Vladimirov via Gdb wrote: > Hi, > > My colleague Ivan already sent this question to this mailing list, but > it looks like his email hasn't landed. > > We are trying to run dejagnu/gdb testsuite on QEMU (RISCV) on Linux. > Some tests that pass on the local machine fail as they expect having > shared libs or other binary files at hardcoded paths on a machine > (QEMU in our case) where the binary is running. > > Question is: is it ok to patch gdb testsuite to get rid of hardcoded > paths. Or maybe this is something intentional? > > Example: gdb.base/print-file-var.exp, see SHLIB_NAME variable. Can you clarify what is your setup? Are you using a remote host test setup? This would mean that you cross-compile and "make check" on your host (e.g. your x86-64 machine), but the testsuite uploads the gdb binary in the VM and runs it there. And GDB itself would debug the local system natively (in the VM). Or, are you using a remote target test setup, where the testsuite starts a gdbserver in the VM and GDB runs on the (e.g. x86-64) host? Either way, it sounds like that test you mention would be broken either way, as SHLIB_NAME would be a path on the host. This would be a mistake, it would need to be fixed. Not many people are using remote host/target test setups, so these mistakes tend to creep in a lot. Simon