From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 5A49D3857C70 for ; Mon, 23 Nov 2020 09:57:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5A49D3857C70 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AN9WZT0049417 for ; Mon, 23 Nov 2020 04:57:01 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34xyrvctrn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Nov 2020 04:57:00 -0500 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0AN9XvRP057335 for ; Mon, 23 Nov 2020 04:57:00 -0500 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 34xyrvctr8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Nov 2020 04:57:00 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AN9Vx48020302; Mon, 23 Nov 2020 09:56:59 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma05fra.de.ibm.com with ESMTP id 34y6k4ryav-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Nov 2020 09:56:58 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AN9uu3h9831114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Nov 2020 09:56:56 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 87D47A405F; Mon, 23 Nov 2020 09:56:56 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A78BA4054; Mon, 23 Nov 2020 09:56:56 +0000 (GMT) Received: from oc4452167425.ibm.com (unknown [9.171.23.8]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 23 Nov 2020 09:56:56 +0000 (GMT) Subject: Re: [PATCH] Use libnss_files.so for tests posix/bug-ga2 and resolv/tst-leaks2 [BZ #26821] To: "H.J. Lu" Cc: GNU C Library References: <20201120120629.3211591-1-stli@linux.ibm.com> From: Stefan Liebler Message-ID: Date: Mon, 23 Nov 2020 10:56:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-23_02:2020-11-20, 2020-11-23 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 phishscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=2 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011230064 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2020 09:57:02 -0000 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 > 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