[3/3] Fix tst-glibc-hwcaps-prepend-cache with custom configure prefix value
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
dj/TryBot-32bit |
success
|
Build for i686
|
Commit Message
---
elf/tst-glibc-hwcaps-prepend-cache.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Comments
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
On 26/03/23 17:00, Romain Geissler via Libc-alpha wrote:
> ---
> elf/tst-glibc-hwcaps-prepend-cache.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/elf/tst-glibc-hwcaps-prepend-cache.c b/elf/tst-glibc-hwcaps-prepend-cache.c
> index 2a448423495..fe074b28028 100644
> --- a/elf/tst-glibc-hwcaps-prepend-cache.c
> +++ b/elf/tst-glibc-hwcaps-prepend-cache.c
> @@ -44,9 +44,13 @@ do_test (void)
> if (dlopen (SONAME, RTLD_NOW) != NULL)
> FAIL_EXIT1 (SONAME " is already on the search path");
>
> - /* Install the default implementation of libmarkermod1.so. */
> - xmkdirp ("/etc", 0777);
> - support_write_file_string ("/etc/ld.so.conf", "/glibc-test/lib\n");
> + {
> + /* Install the default implementation of libmarkermod1.so. */
> + char *conf_path = xasprintf ("%s/ld.so.conf", support_sysconfdir_prefix);
> + xmkdirp (support_sysconfdir_prefix, 0777);
> + support_write_file_string (conf_path, "/glibc-test/lib\n");
> + free (conf_path);
> + }
> xmkdirp ("/glibc-test/lib/glibc-hwcaps/prepend2", 0777);
> xmkdirp ("/glibc-test/lib/glibc-hwcaps/prepend3", 0777);
> {
@@ -44,9 +44,13 @@ do_test (void)
if (dlopen (SONAME, RTLD_NOW) != NULL)
FAIL_EXIT1 (SONAME " is already on the search path");
- /* Install the default implementation of libmarkermod1.so. */
- xmkdirp ("/etc", 0777);
- support_write_file_string ("/etc/ld.so.conf", "/glibc-test/lib\n");
+ {
+ /* Install the default implementation of libmarkermod1.so. */
+ char *conf_path = xasprintf ("%s/ld.so.conf", support_sysconfdir_prefix);
+ xmkdirp (support_sysconfdir_prefix, 0777);
+ support_write_file_string (conf_path, "/glibc-test/lib\n");
+ free (conf_path);
+ }
xmkdirp ("/glibc-test/lib/glibc-hwcaps/prepend2", 0777);
xmkdirp ("/glibc-test/lib/glibc-hwcaps/prepend3", 0777);
{