From: Stefan Liebler <stli@linux.ibm.com>
To: libc-alpha@sourceware.org
Cc: Stefan Liebler <stli@linux.ibm.com>
Subject: [PATCH] Ensure that nsswitch.conf for nss/tst-reload[12] are really synced.
Date: Wed, 10 Mar 2021 16:22:50 +0100 [thread overview]
Message-ID: <20210310152250.3777297-1-stli@linux.ibm.com> (raw)
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
next reply other threads:[~2021-03-10 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 15:22 Stefan Liebler [this message]
2021-03-10 16:26 ` H.J. Lu
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=20210310152250.3777297-1-stli@linux.ibm.com \
--to=stli@linux.ibm.com \
--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).