From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id E4B5B3874C28 for ; Fri, 5 Mar 2021 13:07:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4B5B3874C28 Received: by mail-qt1-x834.google.com with SMTP id v3so1612195qtw.4 for ; Fri, 05 Mar 2021 05:07:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3smOfUmHb/TfBvoLkbAzPw4JYNCqFGyLzbujCZRF8DI=; b=IIyL+hC1PWgm7pyKgS7l1ia5WO5A8pyNi1Z7Wdyh+j71cB5DflXdmplpQ49WO4flTt TMOcczrt8KNouC/u5JCja8OrkhYX7KMcohr4D4LDRu5lxVy6qQpdxsFj2+EoK4XHyuOn 6OZzg2yyLvOHpwR5kct9VRkaDRWfdLk9qGNU4vs94WaMVV+n1h3d/eUPIdBLaN4MfO2+ UKB3B0gJ9zF7dlbOf/ss/HqXSThePuZWtPCkj14RuwttvCqdoRBQVkttTkhQwLf5OE7x lHX56tL/d/QD1mlEgnodi/tTm+/PyolJD2UT6Q6TH615kRECV6fWKoHEYwmI7cGDVudK rHDA== X-Gm-Message-State: AOAM530dI4ls5RajStR+yyIoki7oPKFfUDug35c+hqXv/c4y7hopLrCC knP0LAo1ILk2sEo25xqQVKCwf/Itv7gPpw== X-Google-Smtp-Source: ABdhPJyAfqpTbSdGLihx2CpqTsiB3r6NXZvZaUZO/djWMlqgRP1UFFehF1NUpEHzCXHQf3p0ECAtvg== X-Received: by 2002:ac8:5c81:: with SMTP id r1mr8590437qta.209.1614949629231; Fri, 05 Mar 2021 05:07:09 -0800 (PST) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id c73sm1719489qkg.6.2021.03.05.05.07.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Mar 2021 05:07:09 -0800 (PST) Subject: Re: [PATCH] posix: tst-glob_lstat_compat no longer needs to be an internal test To: libc-alpha@sourceware.org References: <87czwdg3n4.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: Date: Fri, 5 Mar 2021 10:07:06 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <87czwdg3n4.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.5 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.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: Fri, 05 Mar 2021 13:07:11 -0000 On 05/03/2021 09:56, Florian Weimer via Libc-alpha wrote: > compat_symbol_reference is now available for regular tests as well. > Also avoid building and running the tests in case the pre-2.27 > symbol version of glob is not available. This avoids a spurious > UNSUPPORTED result. LGTM, thanks. Reviewed-by: Adhemerval Zanella > > --- > posix/Makefile | 8 +++++++- > posix/tst-glob_lstat_compat.c | 19 ++++--------------- > 2 files changed, 11 insertions(+), 16 deletions(-) > > diff --git a/posix/Makefile b/posix/Makefile > index 239fbb340a..2ee5bb6e1d 100644 > --- a/posix/Makefile > +++ b/posix/Makefile > @@ -104,9 +104,15 @@ tests := test-errno tstgetopt testfnm runtests runptests \ > tst-glob-tilde test-ssize-max tst-spawn4 bug-regex37 \ > bug-regex38 tst-regcomp-truncated tst-spawn-chdir \ > tst-wordexp-nocmd > + > +# Test for the glob symbol version that was replaced in glibc 2.27. > +ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes) > +tests += tst-glob_lstat_compat > +endif > + > tests-internal := bug-regex5 bug-regex20 bug-regex33 \ > tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 \ > - tst-glob_lstat_compat tst-spawn4-compat > + tst-spawn4-compat > tests-container := bug-ga2 > xtests := tst-getaddrinfo4 tst-getaddrinfo5 tst-sched_rr_get_interval > ifeq (yes,$(build-shared)) > diff --git a/posix/tst-glob_lstat_compat.c b/posix/tst-glob_lstat_compat.c > index ef6f1b8c27..97ee51101b 100644 > --- a/posix/tst-glob_lstat_compat.c > +++ b/posix/tst-glob_lstat_compat.c > @@ -25,24 +25,22 @@ > #include > #include > #include > - > +#include > #include > > #include > #include > #include > > -#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_27) > - > __typeof (glob) glob; > /* On alpha glob exists in version GLIBC_2_0, GLIBC_2_1, and GLIBC_2_27. > This test needs to access the version prior to GLIBC_2_27, which is > GLIBC_2_1 on alpha, GLIBC_2_0 elsewhere. */ > -# ifdef __alpha__ > +#ifdef __alpha__ > compat_symbol_reference (libc, glob, glob, GLIBC_2_1); > -# else > +#else > compat_symbol_reference (libc, glob, glob, GLIBC_2_0); > -# endif > +#endif > > /* Compat glob should not call gl_lstat since for some old binaries it > might be unitialized (for instance GNUmake). Check if it is indeed > @@ -256,13 +254,4 @@ do_test (void) > return 0; > } > > -#else /* TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_27) */ > - > -static int > -do_test (void) > -{ > - return 77; > -} > -#endif > - > #include >