From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1663944707; bh=peYRjR/wntsgh3iCYYFCdfHJQPZW8+MTqGXpVBm17uQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=AHC5yh8NEVKPfNfvyufGfLDMeaIuxincn4gZcqYfjzYCUCZrsAH80YVDy8lG2YtDc OyB+unPdyyJGu96TFTlR9MMXcOY4cFTE57ty+LZdf+0Wywr6jZ+z1vsRkbM3xNngej I4T1OgTTRwQYhy2w+Oq1t/Vl2Z+09k8L7WCgmCB8= 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: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,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 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