aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorRomain Geissler <romain.geissler@gmail.com>2023-03-26 19:25:58 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-03-27 16:58:08 -0300
commitbb557fff2ec20e0926932684f69835f90626bb06 (patch)
treee9e1e722a8ff586aff54adbf02617f639552b8b6 /elf
parent4b4b62191e510230baad7031a5075df6a81e5fa5 (diff)
downloadglibc-bb557fff2ec20e0926932684f69835f90626bb06.zip
glibc-bb557fff2ec20e0926932684f69835f90626bb06.tar.gz
glibc-bb557fff2ec20e0926932684f69835f90626bb06.tar.bz2
elf: Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh
Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile2
-rw-r--r--elf/tst-ldconfig-p.sh11
2 files changed, 7 insertions, 6 deletions
diff --git a/elf/Makefile b/elf/Makefile
index a32618a..8cf46ba 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -2405,7 +2405,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 ec937bf..e966c4d1 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"