40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
|
From b7eaa2a6f1b19c30434badfb69b4f1103c9b6a72 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||
|
Date: Tue, 3 Aug 2021 13:37:54 +0200
|
||
|
Subject: [PATCH] t/99exported-symbols.t: Locate shared object file with
|
||
|
DynaLoader
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
This is more portable and allows running the test against
|
||
|
an already installed code.
|
||
|
|
||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||
|
---
|
||
|
t/99exported-symbols.t | 8 +++++++-
|
||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/t/99exported-symbols.t b/t/99exported-symbols.t
|
||
|
index a0159d7..358ffa6 100644
|
||
|
--- a/t/99exported-symbols.t
|
||
|
+++ b/t/99exported-symbols.t
|
||
|
@@ -8,7 +8,13 @@ use Test::More;
|
||
|
$^O eq "linux" or
|
||
|
plan skip_all => "This test only works on Linux (or at least, ELF platforms)";
|
||
|
|
||
|
-my $sofile = "blib/arch/auto/Object/Pad/Pad.so";
|
||
|
+require Object::Pad;
|
||
|
+my $i;
|
||
|
+for (@DynaLoader::dl_modules) {
|
||
|
+ last if $_ eq 'Object::Pad';
|
||
|
+ $i++;
|
||
|
+}
|
||
|
+my $sofile = $DynaLoader::dl_shared_objects[$i];
|
||
|
|
||
|
# Since we load with RTLD_GLOBAL it's important that we don't pollute the
|
||
|
# symbol namespace. Therefore, aside from the `boot_Object__Pad` function, the
|
||
|
--
|
||
|
2.31.1
|
||
|
|