public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stefan Liebler <stli@linux.ibm.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Use libnss_files.so for tests posix/bug-ga2 and resolv/tst-leaks2 [BZ #26821]
Date: Mon, 23 Nov 2020 10:56:56 +0100	[thread overview]
Message-ID: <fc4756f2-5a32-ffc7-5e4c-cf8487e81e19@linux.ibm.com> (raw)
In-Reply-To: <CAMe9rOpLzzzAFj3FPTFH-Gyb5Sz4=rVuzKKGHuUrA-EqV+Qt3Q@mail.gmail.com>

On 11/20/20 2:40 PM, H.J. Lu wrote:
> On Fri, Nov 20, 2020 at 4:08 AM Stefan Liebler via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
>>
>> The tests posix/bug-ga2-mem and resolv/mtrace-tst-leaks2 are failing on
>> fedora 33 as mtrace reports memory leaks.
>>
>> The /etc/nsswitch.conf differs between
>> Fedora 32: hosts:      files dns myhostname
>> Fedora 33: hosts:      files resolve [!UNAVAIL=return] myhostname dns
>>
>> Therefore /lib64/libnss_resolve.so.2 (from systemd) and the dependencies
>> libgcc_s.so.1 and libpthread.so.0 are loaded.
>>
>> Usually all malloc'ed resources from getaddrinfo / gethostbyname are freed
>> and the libraries are dlclose'd in nss/nsswitch.c:libc_freeres_fn (free_mem).
>> Unfortunately, /lib64/libnss_resolve.so.2 is marked with DF_1_NODELETE.
>> As this library is not unmapped, you'll see "Memory not freed".
>>
>> Therefore those tests are now only relying on libnss_files.so by making
>> them test-container tests and providing the required configuration files.
>>
>> By moving the tests to tests-container, those are now running with
>> "make check".  Therefore the mtrace part of the tests are also moved
>> from "make xcheck" to "make check".
>>
>> bug-ga2.c is now using test-driver.c in order to support WAIT_FOR_DEBUGGER
>> environment variable.
>> ---
>>  posix/Makefile                           |  6 +++---
>>  posix/bug-ga2.c                          | 13 +++++++------
>>  posix/bug-ga2.root/etc/hosts             |  1 +
>>  posix/bug-ga2.root/etc/nsswitch.conf     |  2 ++
>>  posix/bug-ga2.root/etc/services          |  1 +
>>  resolv/Makefile                          |  7 +++----
>>  resolv/tst-leaks2.c                      |  6 ++++--
>>  resolv/tst-leaks2.root/etc/hosts         |  1 +
>>  resolv/tst-leaks2.root/etc/nsswitch.conf |  1 +
>>  9 files changed, 23 insertions(+), 15 deletions(-)
>>  create mode 100644 posix/bug-ga2.root/etc/hosts
>>  create mode 100644 posix/bug-ga2.root/etc/nsswitch.conf
>>  create mode 100644 posix/bug-ga2.root/etc/services
>>  create mode 100644 resolv/tst-leaks2.root/etc/hosts
>>  create mode 100644 resolv/tst-leaks2.root/etc/nsswitch.conf
>>
> 
> LGTM.
> 
> Thanks.
> 

I've just committed it and I've also closed the bugzilla.

Thanks,
Stefan

  reply	other threads:[~2020-11-23  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 12:06 Stefan Liebler
2020-11-20 13:40 ` H.J. Lu
2020-11-23  9:56   ` Stefan Liebler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-19 12:28 Stefan Liebler
2020-11-19 15:11 ` H.J. Lu
2020-11-19 15:34   ` Carlos O'Donell
2020-11-20 12:10     ` Stefan Liebler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc4756f2-5a32-ffc7-5e4c-cf8487e81e19@linux.ibm.com \
    --to=stli@linux.ibm.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).