From patchwork Fri Mar 5 12:56:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 42265 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A194D3874C28; Fri, 5 Mar 2021 12:56:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A194D3874C28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614949004; bh=rgctQfBI3utxS8Df2L51MrKbZ0a1C703Eme4ID9RMGw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=HORvK1gjQffEXLMPDqc7zzuxCBLo8c3lYX1qbUJ6fWnSXUSKK/2MPPDIGrprM70nC UEchXmetncDoGdlzYNZ7GogxZfPwZ1QgY9HfHXnlvpXAlmIh3iaxgC7HJFO3iv7+TE muEqlphktaIbQ/6P5HYT1uQg1PZBLWddxmI/PECY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id E4BB73858D29 for ; Fri, 5 Mar 2021 12:56:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4BB73858D29 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-NrTOXsh7NBOMEzLgDlbHwA-1; Fri, 05 Mar 2021 07:56:39 -0500 X-MC-Unique: NrTOXsh7NBOMEzLgDlbHwA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B572B108BD12 for ; Fri, 5 Mar 2021 12:56:38 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-208.ams2.redhat.com [10.36.113.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1793126E59 for ; Fri, 5 Mar 2021 12:56:37 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] posix: tst-glob_lstat_compat no longer needs to be an internal test Date: Fri, 05 Mar 2021 13:56:47 +0100 Message-ID: <87czwdg3n4.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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. 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