From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 0C57A38582AC; Mon, 27 Mar 2023 20:17:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C57A38582AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679948247; bh=l3rt1AYg5sk7dC4JrjdOLymx+PWG9L2Kd4at9HHpVCI=; h=From:To:Subject:Date:From; b=IQ/Ge6MkE7usdV061myelthpffrnyX8N9zhM+Z1sB1qYP2ZPiUNGUblu1R15iW6hh fpfltnEJTRN4geBI9JQIeexdX/vzmLxmNjMEfszmBXHZ05+7VnaT/SX62dadwncMxr SC3Q11kfvVsubPesEbRxsS+yP9LMCMtOJO6CpLyM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] elf: Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh X-Act-Checkin: glibc X-Git-Author: Romain Geissler X-Git-Refname: refs/heads/master X-Git-Oldrev: 4b4b62191e510230baad7031a5075df6a81e5fa5 X-Git-Newrev: bb557fff2ec20e0926932684f69835f90626bb06 Message-Id: <20230327201727.0C57A38582AC@sourceware.org> Date: Mon, 27 Mar 2023 20:17:27 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bb557fff2ec20e0926932684f69835f90626bb06 commit bb557fff2ec20e0926932684f69835f90626bb06 Author: Romain Geissler Date: Sun Mar 26 19:25:58 2023 +0000 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 Diff: --- elf/Makefile | 2 +- elf/tst-ldconfig-p.sh | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/elf/Makefile b/elf/Makefile index a32618a01f..8cf46ba782 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 ec937bf4ec..e966c4d124 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"