This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v6] elf: Add tst-ldconfig-bad-aux-cache test [BZ #18093]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Alexandra Hájková <alexandra dot khirnova at gmail dot com>
- Cc: libc-alpha at sourceware dot org, mcermak at redhat dot com, Alexandra Hájková <ahajkova at redhat dot com>
- Date: Wed, 22 May 2019 10:34:24 +0200
- Subject: Re: [PATCH v6] elf: Add tst-ldconfig-bad-aux-cache test [BZ #18093]
- References: <20190522071012.6749-1-ahajkova@redhat.com>
* Alexandra Hájková:
> create mode 100644 elf/tst-ldconfig-bad-aux-cache.c
> create mode 100644 elf/tst-ldconfig-bad-aux-cache.root/postclean.req
When running the test, I see this:
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
I think you can suppress this message by creating a file:
elf/tst-ldconfig-bad-aux-cache.root/etc/ld.so.conf
The file can be empty, but you can also add a comment saying that it's
there to suppress a warning from ldconfig.
This got me thinking if we need to detect that ldconfig writes to
standard error. The error message above current lands in the .out file.
But perhaps we should defer that to a future enhancement of the test.
(It probably involves using support_capture_subprocess.)
I think with the ld.so.conf file, this is ready to push.
Thanks,
Florian