]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh
authorRomain Geissler <romain.geissler@gmail.com>
Sun, 26 Mar 2023 19:25:58 +0000 (19:25 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 27 Mar 2023 19:58:08 +0000 (16:58 -0300)
Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/Makefile
elf/tst-ldconfig-p.sh

index a32618a01f4b8aa8cb309b9eb52cb3eb37dfc8ad..8cf46ba782e52f98cbb58baaed04369a9c79f487 100644 (file)
@@ -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)
 
index ec937bf4ec04e8c06b89c39b558762276543db68..e966c4d124136f92abccc2a451cc9dc14638b3b3 100644 (file)
 # 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"