From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by sourceware.org (Postfix) with ESMTPS id 629C53857034 for ; Mon, 25 Jul 2022 12:35:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 629C53857034 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-10bd4812c29so14488653fac.11 for ; Mon, 25 Jul 2022 05:35:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:organization:in-reply-to :content-transfer-encoding; bh=YmwAY75kinAii/hjydiHvL7XPqIwD7RFGhs0PXGimH4=; b=pjhKgpaYDL12DKK1nbjDNEiiXCSUE85n8rTcLy8O2+HOXKLRNDTYvY0By+lIgCLurW 5PBqldlfZa3jlWpeWyJ031dGSezM4Bn5cla+fJz3KpnRsqgKa8KeXwZrnikIQuL8X8JC T0x+arL2bYJ5tmTWt2SD9GJa1A2eTAWNgz/UmqKnBiTiJosy5yzFLnrVL9Xo6wW3AOxF 92h0a+ihokgMDWJW5JlX+mxCyySp/Si724XAqP36d4aRUwDecRhGf1rvj8Py66733O3H /78m/xS4LcjepESe6yqN2Plazx604/6CXi+NgM16cXojO6s8G6VhmnZNrZHRbkD0CN0H h/zw== X-Gm-Message-State: AJIora8Vk5s0f3hy3knoJ5ImW9NsTERuYp9pg2ESkrvV1LkHG0cRubHN pnoFd2Ax3IQolRCbbCRUt2CYxMV7+LyR5Q== X-Google-Smtp-Source: AGRyM1vFCKHQc5uUREMHoAieHMrhekum9i+x7roPAOL9HQURe20MvLN2zWUub4CaSnXb2UIsU4uIAw== X-Received: by 2002:a05:6870:2488:b0:10c:3362:17ff with SMTP id s8-20020a056870248800b0010c336217ffmr13718568oaq.33.1658752529173; Mon, 25 Jul 2022 05:35:29 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:8ded:894b:344:2c82:9bb5? ([2804:431:c7cb:8ded:894b:344:2c82:9bb5]) by smtp.gmail.com with ESMTPSA id c11-20020a056870478b00b00101bc3380a5sm5920620oaq.12.2022.07.25.05.35.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 05:35:28 -0700 (PDT) Message-ID: <94065d81-5d88-9881-76b3-900b5c34e2ec@linaro.org> Date: Mon, 25 Jul 2022 09:35:27 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH] Linux: dirent/tst-readdir64-compat needs to use TEST_COMPAT (bug 27654) Content-Language: en-US To: libc-alpha@sourceware.org References: <87k081sj8i.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87k081sj8i.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 25 Jul 2022 12:35:31 -0000 On 25/07/22 05:13, Florian Weimer via Libc-alpha wrote: > The hppa port starts libc at GLIBC_2.2, but has earlier symbol > versions in other shared objects. This means that the compat > symbol for readdir64 is not actually present in libc even though > have-GLIBC_2.1.3 is defined as yes at the make level. > > Fixes commit 15e50e6c966fa0f26612602a95f0129543d9f9d5 ("Linux: > dirent/tst-readdir64-compat can be a regular test") by mostly > reverting it. > > Tested on i686-linux-gnu. Built on hppa-linux-gnu. LGTM, thanks. This is ok for 2.36. > > --- > sysdeps/unix/sysv/linux/Makefile | 10 ++++------ > sysdeps/unix/sysv/linux/tst-readdir64-compat.c | 4 ++++ > 2 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile > index 2ccc92b6b8..a139a16532 100644 > --- a/sysdeps/unix/sysv/linux/Makefile > +++ b/sysdeps/unix/sysv/linux/Makefile > @@ -361,12 +361,10 @@ inhibit-glue = yes > > ifeq ($(subdir),dirent) > sysdep_routines += getdirentries getdirentries64 > -tests += tst-getdents64 > - > -# The tested readdir64 symbol was replaced in glibc 2.2. > -ifeq ($(have-GLIBC_2.1.3)$(build-shared),yesyes) > -tests += tst-readdir64-compat > -endif > +tests += \ > + tst-getdents64 \ > + tst-readdir64-compat \ > + # tests > endif # $(subdir) == dirent > > ifeq ($(subdir),nis) > diff --git a/sysdeps/unix/sysv/linux/tst-readdir64-compat.c b/sysdeps/unix/sysv/linux/tst-readdir64-compat.c > index e1f6166146..1f1302e543 100644 > --- a/sysdeps/unix/sysv/linux/tst-readdir64-compat.c > +++ b/sysdeps/unix/sysv/linux/tst-readdir64-compat.c > @@ -37,12 +37,15 @@ struct __old_dirent64 > > typedef struct __old_dirent64 *(*compat_readdir64_type) (DIR *); > > +#if TEST_COMPAT (libc, GLIBC_2_1, GLIBC_2_2) > struct __old_dirent64 *compat_readdir64 (DIR *); > compat_symbol_reference (libc, compat_readdir64, readdir64, GLIBC_2_1); > +#endif > > static int > do_test (void) > { > +#if TEST_COMPAT (libc, GLIBC_2_1, GLIBC_2_2) > /* Directory stream using the non-compat readdir64 symbol. The test > checks against this. */ > DIR *dir_reference = opendir ("."); > @@ -104,6 +107,7 @@ do_test (void) > > TEST_COMPARE (closedir (dir_test), 0); > TEST_COMPARE (closedir (dir_reference), 0); > +#endif > return 0; > } > >