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 <xry111@xry111.site>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
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