From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 706471FF0E1 for ; Mon, 10 Aug 2026 14:01:10 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 093A521661; Mon, 10 Aug 2026 14:01:10 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 10 Aug 2026 14:01:05 +0200 Message-Id: Subject: Re: [PATCH proxmox-perl-rs v3] make: improve library path detection for tests From: "Elias Huhsovitz" To: "Max R. Carrara" , X-Mailer: aerc 0.20.0 References: <20260807090809.101155-1-m.carrara@proxmox.com> In-Reply-To: <20260807090809.101155-1-m.carrara@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786363254049 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.865 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: VDU4XTBUCV4JD5IG43GCUKVQLYOYR537 X-Message-ID-Hash: VDU4XTBUCV4JD5IG43GCUKVQLYOYR537 X-MailFrom: e.huhsovitz@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Tested by doing the following inside a fresh VM: apt install build-essential devscripts git git-email pve-doc-generator mk-build-deps --install1 make check Worked as intended. Therefore consider this. Reviewed-by: Elias Huhsovitz Tested-by: Elias Huhsovitz On Fri Aug 7, 2026 at 11:07 AM CEST, Max R. Carrara wrote: > Export LD_LIBRARY_PATH containing the absolute path to the current > Rust target's directory in the top-level Makefile. > > This allows the bootstrap machinery in Proxmox::Lib::PVE to find the > compiled .so file when testing and building. > > Since it's not needed anymore, remove the `sed` workaround in the > `all` target. > > Signed-off-by: Max R. Carrara > --- > Changes: > > v2 --> v3: > * Incorporate Elias's feedback (thanks a lot!) and use $(CURDIR) > instead of ($shell pwd), as well as immediate assignment (`:=3D`) > instead of lazy assignment (`=3D`) > > v1 --> v2: > * Use 'improve' instead of 'fix' in the commit message because 'fix' > implies that something was broken, which it wasn't > * Use LD_LIBRARY_PATH instead of PERL5LIB, as the latter didn't > actually work -- was a false positive on my side, as the .so file > installed on my workstation was used > > pve-rs/Makefile | 7 +++---- > pve-rs/test/Makefile | 2 +- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/pve-rs/Makefile b/pve-rs/Makefile > index bb1cd2d..a597589 100644 > --- a/pve-rs/Makefile > +++ b/pve-rs/Makefile > @@ -48,6 +48,9 @@ else > TARGET_DIR=3Ddebug > endif > > +# Used to tell tests where the compiled .so file resides > +export LD_LIBRARY_PATH :=3D $(CURDIR)/target/$(TARGET_DIR) > + > # better way to automate this without a massively annoying cargo-metatda= ta + jq > # chain that spits out errors? > PROXMOX_DOC_CRATES :=3D \ > @@ -75,10 +78,6 @@ PROXMOX_DOC_URL_FLAGS =3D $(foreach crate,$(PROXMOX_DO= C_CRATES),$(call make_rustdo > > all: PVE > cargo build $(CARGO_BUILD_ARGS) > - mkdir -p test/Proxmox/Lib > - sed -r -e \ > - 's@^sub libfile.*$$@sub libfile { "$(shell pwd)/target/$(TARGET_DIR)/= libpve_rs.so"; }@' \ > - Proxmox/Lib/PVE.pm >test/Proxmox/Lib/PVE.pm > > Proxmox: Proxmox/Lib/PVE.pm > PVE: $(PERLMOD_PACKAGE_FILES) > diff --git a/pve-rs/test/Makefile b/pve-rs/test/Makefile > index 29dc955..2399b86 100644 > --- a/pve-rs/test/Makefile > +++ b/pve-rs/test/Makefile > @@ -1,5 +1,5 @@ > .PHONY: test > -test: Proxmox/Lib/PVE.pm > +test: > @echo "-- running pve-rs tests --" > perl -I. -I.. -I../.. ./resource_scheduling.pl > > -- > 2.47.3