Re: [PATCH] elf: test: handle different rootsbindir in tst-ldconfig-cache
Xi Ruoyao <[email protected]> Mon, 27 Jul 2026 23:44:38 +0800
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2026-07-27 at 12:37 +0200, Florian Weimer wrote: > * Xi Ruoyao: > > > When compiling a glibc for a merged-/usr distro people may set > > rootsbindir=/usr/sbin. But tst-ldconfig-cache has hard-coded > > /sbin/ldconfig path and so it fails with a different rootsbindir. > > > > Fix it by using support_install_rootsbindir like run_ldconfig in > > test-container.c. > > > > Signed-off-by: Xi Ruoyao <[email protected]> > > --- > > elf/tst-ldconfig-cache.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/elf/tst-ldconfig-cache.c b/elf/tst-ldconfig-cache.c > > index 9f71418b3a..f4820a1822 100644 > > --- a/elf/tst-ldconfig-cache.c > > +++ b/elf/tst-ldconfig-cache.c > > @@ -85,7 +85,10 @@ corrupt (void) > > static void > > ldconfig (void) > > { > > - xsystem ("/sbin/ldconfig -X"); > > + char *cmd = xasprintf("%s/ldconfig -X", support_install_rootsbindir); > > + xsystem (cmd); > > + > > + free(cmd); > > } > > > > /* Change ld.so.conf to refer to the new directory, and generate a new > > Looks good to me, thanks. > > Reviewed-by: Florian Weimer <[email protected]> > > Are you a committer yet? Not yet. > Should I push this for you? Yes if no objection from others. -- Xi Ruoyao <[email protected]>