public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Ensure that nsswitch.conf for nss/tst-reload[12] are really synced.
@ 2021-03-10 15:22 Stefan Liebler
  2021-03-10 16:26 ` H.J. Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefan Liebler @ 2021-03-10 15:22 UTC (permalink / raw)
  To: libc-alpha; +Cc: Stefan Liebler

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-11  8:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 15:22 [PATCH] Ensure that nsswitch.conf for nss/tst-reload[12] are really synced Stefan Liebler
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

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).