* [PATCH v2] Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh.
@ 2023-03-26 19:25 Romain Geissler
2023-03-27 17:24 ` Adhemerval Zanella Netto
0 siblings, 1 reply; 2+ messages in thread
From: Romain Geissler @ 2023-03-26 19:25 UTC (permalink / raw)
To: libc-alpha; +Cc: adhemerval.zanella, romain.geissler
Hi,
This is a follow up of https://sourceware.org/pipermail/libc-alpha/2023-March/146331.html
this sent by git send-mail, so hopefully the patch applies fine.
Cheers,
Romain
Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh.
---
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 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"
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh.
2023-03-26 19:25 [PATCH v2] Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh Romain Geissler
@ 2023-03-27 17:24 ` Adhemerval Zanella Netto
0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella Netto @ 2023-03-27 17:24 UTC (permalink / raw)
To: Romain Geissler, libc-alpha; +Cc: romain.geissler
On 26/03/23 16:25, Romain Geissler wrote:
> Hi,
>
> This is a follow up of https://sourceware.org/pipermail/libc-alpha/2023-March/146331.html
> this sent by git send-mail, so hopefully the patch applies fine.
>
> Cheers,
> Romain
>
>
> Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
> ---
> 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 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"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-27 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 19:25 [PATCH v2] Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh Romain Geissler
2023-03-27 17:24 ` Adhemerval Zanella Netto
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).