From: Sam James <sam@gentoo.org>
To: binutils@sourceware.org
Cc: nickc@redhat.com, Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Subject: [2.41 PATCH 10/10] Fix 30808 gprofng tests failed
Date: Sat, 16 Dec 2023 04:01:33 +0000 [thread overview]
Message-ID: <20231216040239.1981071-11-sam@gentoo.org> (raw)
In-Reply-To: <20231216040239.1981071-1-sam@gentoo.org>
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
In gprofng testing, we need a tempory gprofng installation to resolve run-time
dependencies on libraries (libgprofng, libopcodes, libbfd, etc).
We set LD_LIBRARY_PATH and GPROFNG_SYSCONFDIR to find our libraries and
configuration file. These variables must be set for all gprofng tests.
Tested on aarch64 and x86_64 with and without --enable-shared and --target=<>.
gprofng/ChangeLog
2023-08-31 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/30808
* testsuite/config/default.exp: Make a temporary install dir.
Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR.
* testsuite/lib/Makefile.skel: Move LD_LIBRARY_PATH and
GPROFNG_SYSCONFDIR setting in testsuite/config/default.exp.
(cherry picked from commit a13e4c5c10d1a13d9128d033c9525810e876ac14)
---
gprofng/testsuite/config/default.exp | 20 ++++++++++++++------
gprofng/testsuite/lib/Makefile.skel | 5 -----
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/gprofng/testsuite/config/default.exp b/gprofng/testsuite/config/default.exp
index 1c862d54592..c4a6588bb64 100644
--- a/gprofng/testsuite/config/default.exp
+++ b/gprofng/testsuite/config/default.exp
@@ -32,17 +32,25 @@ if {![info exists CFLAGS]} {
set CFLAGS "-g -O2"
}
+remote_exec host "sh -c \"rm -rf tmpdir; mkdir -p tmpdir\""
if { "$CHECK_TARGET" == "check-install" } {
set ::env(GPROFNG) "$PREFIX/bin/gprofng"
} else {
- set ::env(GPROFNG) "$BUILDDIR/src/gprofng"
+ # Make a temporary install dir to run gprofng from, and point at it
+ remote_exec host "sh -c \"$MAKE -C .. install-gprofng MAKEFLAGS=program_transform_name= DESTDIR=$BUILDDIR/tmpdir/root\""
+ set ::env(GPROFNG) [exec find $BUILDDIR/tmpdir -type f -name gprofng -perm -u+x | head -1]
+
+ set x [exec find $BUILDDIR/tmpdir -type d -name gprofng | head -1]
+ set ::env(LD_LIBRARY_PATH) "$x:$x/.."
+
+ set x [exec find $BUILDDIR/tmpdir -type f -name gprofng.rc | head -1]
+ set ::env(GPROFNG_SYSCONFDIR) [exec dirname $x]
+
+ puts "### LD_LIBRARY_PATH: $env(LD_LIBRARY_PATH)"
+ puts "### GPROFNG_SYSCONFDIR: $env(GPROFNG_SYSCONFDIR)"
}
+puts "### GPROFNG: $env(GPROFNG)"
set TEST_TIMEOUT 300
-# Create directories where gprofng can find libraries and binaries:
-remote_exec host "sh -c \"rm -rf tmpdir; mkdir -p tmpdir\""
-remote_exec host "sh -c \"mkdir -p lib; rm -f lib/gprofng; ln -s ../libcollector/.libs lib/gprofng\""
-remote_exec host "sh -c \"rm -f bin; ln -s src bin\""
-
load_lib display-lib.exp
diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Makefile.skel
index 5a30966c1cd..9ccc0340c10 100644
--- a/gprofng/testsuite/lib/Makefile.skel
+++ b/gprofng/testsuite/lib/Makefile.skel
@@ -39,11 +39,6 @@ DISPLAY = $(GPROFNG) display text
EXPERIMENT = test.er
DISPLAY_LOG = display.log
-export LD_LIBRARY_PATH := $(BUILDDIR)/src
-
-# Set GPROFNG_SYSCONFDIR to find out gprofng.rc:
-export GPROFNG_SYSCONFDIR := $(srcdir)/../../../src
-
.PHONY: all collect compare clobber clean
all: compare
--
2.43.0
next prev parent reply other threads:[~2023-12-16 4:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 4:01 [2.41 PATCH 00/10] Misc binutils-2.41 test fixes Sam James
2023-12-16 4:01 ` [2.41 PATCH 01/10] gprofng: 30700 tmpdir/gp-collect-app_F test fails Sam James
2023-12-16 4:01 ` [2.41 PATCH 02/10] Fix "--only-keep-debug for ELF relocatables" binutils test for compilers which add .debug_macro sections to object files Sam James
2023-12-16 4:01 ` [2.41 PATCH 03/10] ld: Build libpr23169a.so with -z lazy Sam James
2023-12-16 4:01 ` [2.41 PATCH 04/10] ld: Fix relocatable.d XFAIL/notarget entry for hppa Sam James
2023-12-16 4:01 ` [2.41 PATCH 05/10] ld: Fix retain7a.d " Sam James
2023-12-16 4:01 ` [2.41 PATCH 06/10] ld: fix relocatable, retain7a target pattens for HPPA Sam James
2023-12-16 4:01 ` [2.41 PATCH 07/10] ld: ld-lib.exp: log failed dump.out contents for debugging Sam James
2023-12-16 4:01 ` [2.41 PATCH 08/10] ld/x86: reduce testsuite dependency on system object files Sam James
2023-12-16 4:01 ` [2.41 PATCH 09/10] Fix " Sam James
2023-12-16 4:01 ` Sam James [this message]
2023-12-20 10:59 ` [2.41 PATCH 00/10] Misc binutils-2.41 test fixes Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231216040239.1981071-11-sam@gentoo.org \
--to=sam@gentoo.org \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
--cc=vladimir.mezentsev@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).