Message ID | 20210310152250.3777297-1-stli@linux.ibm.com |
---|---|
State | Dropped |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> 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 1D905384A018; Wed, 10 Mar 2021 15:23:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D905384A018 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615389783; bh=utAhz6sEweVs0/5cWbW2j/KMNiqbmd6GTtAlNMth4Xg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=qr14xN97xkIMj+6GN79bjUXdNdOThK9zWj4hijqP7AQVlyzbE7fo6ZFm3ExvWaZRl J5XdiymSeb7ggqUh/CNx7Qr80EkiNj8W+vc+C2gddGacQtErCgb0jlkBDiJ+oiHPIR PteWTyahJWGkjRxHyj5VUU3bRrjENcVLHBWYIWAc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 86AA5384B820 for <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 15:23:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 86AA5384B820 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 12AF3r53188179 for <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 10:23:00 -0500 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 376gwth84y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 10:23:00 -0500 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 12AFDnHt018467 for <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 15:22:58 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03ams.nl.ibm.com with ESMTP id 3768t4h3rf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 15:22:58 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 12AFMtEa12386620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Mar 2021 15:22:55 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66D6B11C080; Wed, 10 Mar 2021 15:22:55 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A0C911C054; Wed, 10 Mar 2021 15:22:55 +0000 (GMT) Received: from t3560005.lnxne.boe (unknown [9.152.108.100]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 10 Mar 2021 15:22:55 +0000 (GMT) To: libc-alpha@sourceware.org Subject: [PATCH] Ensure that nsswitch.conf for nss/tst-reload[12] are really synced. Date: Wed, 10 Mar 2021 16:22:50 +0100 Message-Id: <20210310152250.3777297-1-stli@linux.ibm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-10_08:2021-03-10, 2021-03-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 mlxscore=0 mlxlogscore=749 clxscore=1011 bulkscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103100073 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Stefan Liebler via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Stefan Liebler <stli@linux.ibm.com> Cc: Stefan Liebler <stli@linux.ibm.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
Ensure that nsswitch.conf for nss/tst-reload[12] are really synced.
|
|
Commit Message
Stefan Liebler
March 10, 2021, 3:22 p.m. UTC
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(+)
Comments
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.
On 3/10/21 5:26 PM, H.J. Lu wrote: > 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. > I'm getting the same output as mentioned in the bugzilla: $ cd <builddir> $ rm -f testroot.root/etc/nsswitch.conf $ make t=nss/tst-reload1 test PASS: nss/tst-reload1 $ cat testroot.root/etc/nsswitch.conf passwd: test2 group: test2 hosts: test2 $ make t=nss/tst-reload2 test tst-reload2.c:112: numeric comparison failure left: 5 (0x5); from: pw->pw_uid right: 1234 (0x4d2); from: 1234 error: tst-reload2.c:130: not true: pw->pw_uid != 2468 tst-reload2.c:136: numeric comparison failure left: 5 (0x5); from: pw->pw_uid right: 1234 (0x4d2); from: 1234 error: tst-reload2.c:146: not true: he != NULL error: 4 test failures $ cat testroot.root/etc/nsswitch.conf passwd: test2 group: test2 hosts: test2 According to tst-reload2.c and current nsswitch.conf, it is using pwd_table2, which is PWD_N (5, "test1"). According to the nss/tst-reload2.root/etc/nsswitch.conf, it should use PWD_N (1234, "test1") of pwd_table1. Thus, yes, I assume this is the same issue. Bye, Stefan
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