public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Stefan Liebler <stli@linux.ibm.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Ensure that nsswitch.conf for nss/tst-reload[12] are really synced.
Date: Wed, 10 Mar 2021 08:26:26 -0800	[thread overview]
Message-ID: <CAMe9rOoad2GVu+4F0tbzt6h1qzdWsnsx-rcc6C6YdC7B=VA3qw@mail.gmail.com> (raw)
In-Reply-To: <20210310152250.3777297-1-stli@linux.ibm.com>

On Wed, Mar 10, 2021 at 8:06 AM Stefan Liebler via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Both tests, nss/tst-reload1 and nss/tst-reload2 are test-container
> tests and both provide a root directory for the container.
>
> Unfortunately on a fresh git clone, all the nsswitch files have
> the same size of 40bytes and timestamp:
> nss/tst-reload1.root/etc/nsswitch.conf2
> nss/tst-reload2.root/etc/nsswitch.conf
> nss/tst-reload2.root/subdir/etc/nsswitch.conf
> nss/tst-reload1.root/etc/nsswitch.conf
>
> After running tst-reload1, the <objpfx>/testroot.root/etc/nsswitch.conf
> file has the content of nss/tst-reload1.root/etc/nsswitch.conf2.
>
> Rerunning with "make t=nss/tst-reload1 test" leads to fails
> as nsswitch.conf is not synced by test-container.c.
>
> Therefore this patch just adds different comments to those files
> to ensure that test-container.c is always syncing them.
> ---
>  nss/tst-reload1.root/etc/nsswitch.conf  | 4 ++++
>  nss/tst-reload1.root/etc/nsswitch.conf2 | 3 +++
>  nss/tst-reload2.root/etc/nsswitch.conf  | 2 ++
>  3 files changed, 9 insertions(+)
>
> diff --git a/nss/tst-reload1.root/etc/nsswitch.conf b/nss/tst-reload1.root/etc/nsswitch.conf
> index 606d8f51d6..56248fc8a3 100644
> --- a/nss/tst-reload1.root/etc/nsswitch.conf
> +++ b/nss/tst-reload1.root/etc/nsswitch.conf
> @@ -1,3 +1,7 @@
> +# This nsswitch.conf file should be synced by test-container.c while starting
> +# tst-reload1.  Ensure that the size differs compared to the other
> +# nsswitch.conf[2] files of tst-reload1 or tst-reload2.  Otherwise
> +# test-container.c won't sync it.
>  passwd:        test1
>  group: test1
>  hosts: test1
> diff --git a/nss/tst-reload1.root/etc/nsswitch.conf2 b/nss/tst-reload1.root/etc/nsswitch.conf2
> index 2e93977efb..762dcc3f36 100644
> --- a/nss/tst-reload1.root/etc/nsswitch.conf2
> +++ b/nss/tst-reload1.root/etc/nsswitch.conf2
> @@ -1,3 +1,6 @@
> +# This nsswitch.conf will be used while running tst-reload2.
> +# Ensure that the size differs compared to the other nsswitch.conf[2] files of
> +# tst-reload1 or tst-reload2.  Otherwise test-container.c won't sync it.
>  passwd:        test2
>  group: test2
>  hosts: test2
> diff --git a/nss/tst-reload2.root/etc/nsswitch.conf b/nss/tst-reload2.root/etc/nsswitch.conf
> index 688a589519..fbe057480f 100644
> --- a/nss/tst-reload2.root/etc/nsswitch.conf
> +++ b/nss/tst-reload2.root/etc/nsswitch.conf
> @@ -1,3 +1,5 @@
> +# Ensure that the size differs compared to the other nsswitch.conf[2] files of
> +# tst-reload1 or tst-reload2.  Otherwise test-container.c won't sync it.
>  passwd: test1
>  group: test2
>  hosts: files
> --
> 2.28.0
>

Does this fix

https://sourceware.org/bugzilla/show_bug.cgi?id=27537

If yes, please mention it in the commit log.

Thanks.

-- 
H.J.

  reply	other threads:[~2021-03-10 16:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 15:22 Stefan Liebler
2021-03-10 16:26 ` H.J. Lu [this message]
2021-03-11  8:25   ` Stefan Liebler
2021-03-10 18:29 ` DJ Delorie
2021-03-10 19:06 ` DJ Delorie
2021-03-11  8:25   ` Stefan Liebler

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='CAMe9rOoad2GVu+4F0tbzt6h1qzdWsnsx-rcc6C6YdC7B=VA3qw@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=stli@linux.ibm.com \
    /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).