diff mbox series

[v2] Run $(objpfx)iconvconfig with $(run-program-prefix) [BZ #27477]

Message ID CAMe9rOp9iPQbSnERX8Oi=h_TDtoTXyC4X03vo4CMqpvmUgbpuA@mail.gmail.com
State Committed
Headers show
Series [v2] Run $(objpfx)iconvconfig with $(run-program-prefix) [BZ #27477] | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

H.J. Lu May 6, 2021, 6:04 p.m. UTC
On Thu, May 6, 2021 at 8:23 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu via Libc-alpha:
>
> > diff --git a/iconv/Makefile b/iconv/Makefile
> > index 659857dd8c..4af3eea0d8 100644
> > --- a/iconv/Makefile
> > +++ b/iconv/Makefile
> > @@ -95,11 +95,13 @@ $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
> >  $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
> >  $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
> >
> > -$(objpfx)test-iconvconfig.out: /dev/null $(objpfx)iconvconfig
> > +$(objpfx)test-iconvconfig.out: $(objpfx)iconvconfig
> >       (set -e; \
> >        tmp=$(objpfx)gconv-modules.cache.$$$$; \
> >        rm -f $$tmp; \
> > -      $(make-test-out) --output=$$tmp --nostdlib $(inst_gconvdir); \
> > +      $(built-program-cmd-before-env) \
> > +             $(run-program-env) $(built-program-cmd-after-env) $< \
> > +             --output=$$tmp --nostdlib $(inst_gconvdir); \
> >        cmp $$tmp $(inst_gconvdir)/gconv-modules.cache; \
> >        rm -f $$tmp) > $@; \
> >       $(evaluate-test)
>
> Should tests use $(test-wrapper-env) instead of $(run-program-env)

I think we should use

$(run-program-prefix) $(objpfx)iconvconfig

> $(built-program-cmd-after-env)?  I think it's commonly used (mostly
> along with shell scripts though).
>
> Thanks,
> Florian
>

Here is the v2 patch.

Comments

Florian Weimer May 7, 2021, 10:21 a.m. UTC | #1
* H. J. Lu via Libc-alpha:

>> Should tests use $(test-wrapper-env) instead of $(run-program-env)
>
> I think we should use
>
> $(run-program-prefix) $(objpfx)iconvconfig

You are more familiar with the makefiles than I am.  I do not have any
objection to the proposed patch.

Thanks,
Florian
H.J. Lu May 7, 2021, 11:39 a.m. UTC | #2
On Fri, May 7, 2021 at 3:21 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu via Libc-alpha:
>
> >> Should tests use $(test-wrapper-env) instead of $(run-program-env)
> >
> > I think we should use
> >
> > $(run-program-prefix) $(objpfx)iconvconfig
>
> You are more familiar with the makefiles than I am.  I do not have any
> objection to the proposed patch.
>
> Thanks,
> Florian
>

I checked it in.
diff mbox series

Patch

From 3eecd04de751a0d6df007da6826e7daa4c7609ce Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Fri, 26 Feb 2021 13:07:18 -0800
Subject: [PATCH v2] Run $(objpfx)iconvconfig with $(run-program-prefix) [BZ
 #27477]

When glibc is configured with --enable-hardcoded-path-in-tests,
"make xcheck" failed with

...
env GCONV_PATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconvdata LOCPATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/localedata LC_ALL=C  /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig  --output=$tmp --nostdlib /usr/lib64/gconv;
...
/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig)
...
FAIL: iconv/test-iconvconfig

Since $(objpfx)iconvconfig is an installed program, run it with
$(run-program-prefix).
---
 iconv/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/iconv/Makefile b/iconv/Makefile
index 659857dd8c..a9b267c851 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -95,11 +95,12 @@  $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
 $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
 $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
 
-$(objpfx)test-iconvconfig.out: /dev/null $(objpfx)iconvconfig
+$(objpfx)test-iconvconfig.out: $(objpfx)iconvconfig
 	(set -e; \
 	 tmp=$(objpfx)gconv-modules.cache.$$$$; \
 	 rm -f $$tmp; \
-	 $(make-test-out) --output=$$tmp --nostdlib $(inst_gconvdir); \
+	 $(run-program-prefix) $(objpfx)iconvconfig \
+		--output=$$tmp --nostdlib $(inst_gconvdir); \
 	 cmp $$tmp $(inst_gconvdir)/gconv-modules.cache; \
 	 rm -f $$tmp) > $@; \
 	$(evaluate-test)
-- 
2.31.1