public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Romain Geissler <romain.geissler@gmail.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh
Date: Mon, 13 Mar 2023 22:46:57 +0100	[thread overview]
Message-ID: <586cec0c-4497-1029-da8f-e55d1967bba7@gmail.com> (raw)

Hi,

While upgrading to the latest commit of the release branch 2.37, with an exotic glibc installation (I override explicitly the --prefix destination, the test tst-ldconfig-p.sh failed. Here is a small patch to take into account ${sysconfdir} so we don't hardcode it to /etc.

PS: I hope the patch will be well formed, I have just setup Thunderbird to write this mail using gmail.com's smtp, unfortunately my employer forbids using anything else than Outlook to send mails, and almost no open source tools support the Exchange protocol...

Cheers,
Romain


commit ad491ee678026eea33e4654da4ce86d4835bd240
Author: Romain Geissler <romain.geissler@amadeus.com>
Date:   Mon Mar 13 20:04:48 2023 +0000

    Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh.

diff --git a/elf/Makefile b/elf/Makefile
index 4d0e04b2a20..262fbd1770c 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -2421,7 +2421,7 @@ $(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig
     $(evaluate-test)
 
 $(objpfx)tst-ldconfig-p.out : tst-ldconfig-p.sh $(objpfx)ldconfig
-    $(SHELL) $< '$(common-objpfx)' '$(test-wrapper-env)' \
+    $(SHELL) $< '$(common-objpfx)' '$(sysconfdir)' '$(test-wrapper-env)' \
          '$(run-program-env)' > $@; \
     $(evaluate-test)
 
diff --git a/elf/tst-ldconfig-p.sh b/elf/tst-ldconfig-p.sh
index ec937bf4ec0..e966c4d1241 100644
--- a/elf/tst-ldconfig-p.sh
+++ b/elf/tst-ldconfig-p.sh
@@ -23,11 +23,12 @@
 # involves emulation when running ldconfig).
 
 common_objpfx=$1
-test_wrapper_env=$2
-run_program_env=$3
+sysconfdir=$2
+test_wrapper_env=$3
+run_program_env=$4
 
-if ! test -r /etc/ld.so.cache; then
-    echo "warning: /etc/ld.so.cache does not exist, test skipped"
+if ! test -r "${sysconfdir}/ld.so.cache"; then
+    echo "warning: ${sysconfdir}/ld.so.cache does not exist, test skipped"
     exit 77
 fi
 
@@ -46,7 +47,7 @@ errors=0
 case $status in
     (0)
     if head -n 1 "$testout" | \
-        grep -q "libs found in cache \`/etc/ld.so.cache'\$" ; then
+        grep -q "libs found in cache \`${sysconfdir}/ld.so.cache'\$" ; then
         echo "info: initial string found" >>"$testout"
     else
         echo "error: initial string not found" >>"$testout"


             reply	other threads:[~2023-03-13 21:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 21:46 Romain Geissler [this message]
2023-03-22 11:51 ` Adhemerval Zanella Netto
2023-03-25 19:23   ` Romain GEISSLER

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=586cec0c-4497-1029-da8f-e55d1967bba7@gmail.com \
    --to=romain.geissler@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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).