public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH] Linux: dirent/tst-readdir64-compat needs to use TEST_COMPAT (bug 27654)
Date: Mon, 25 Jul 2022 09:35:27 -0300	[thread overview]
Message-ID: <94065d81-5d88-9881-76b3-900b5c34e2ec@linaro.org> (raw)
In-Reply-To: <87k081sj8i.fsf@oldenburg.str.redhat.com>



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;
>  }
>  
> 

      reply	other threads:[~2022-07-25 12:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  8:13 Florian Weimer
2022-07-25 12:35 ` Adhemerval Zanella Netto [this message]

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=94065d81-5d88-9881-76b3-900b5c34e2ec@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --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).