From patchwork Wed Jun 26 05:56:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yu, Mingli" X-Patchwork-Id: 45632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2148C27C4F for ; Wed, 26 Jun 2024 05:57:07 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web11.18773.1719381418305459130 for ; Tue, 25 Jun 2024 22:56:58 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=6907085cc7=mingli.yu@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45Q2FRmT002077 for ; Wed, 26 Jun 2024 05:56:57 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3ywktwuk38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 26 Jun 2024 05:56:57 +0000 (GMT) Received: from m0250811.ppops.net (m0250811.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45Q5uuHH017003 for ; Wed, 26 Jun 2024 05:56:56 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3ywktwuk36-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Jun 2024 05:56:56 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QgFsCakn0P5GPJfjUiaxrpxEgC2scrA8QSACRHOKsNgDNsdNp/dR5sgpjskAiE9wvmHZqKJm4zxHXQQzVuDfNPcl480ZI6pQx94vbUxSjPZlFJ8xHO1jwFxtsiaYvz22KqwX7RKQv+B7FI9AAwuMQSP0Y5JClbLSW1shKXwYkXG5dJWLVwjBM++LUP1IShIpZbXHhsPmJm22KwO/S9c35JLcEg1elU59ucUZJAkMVAKV7QLT3PyQ+Xve3g2W95k7Y1al8RJ7F6KC410VbAEQzcoq2ECy9i8GJeQlzMXBJoM/76yew0ial9GegLFxttFm5T9lsESYcB1ImJjweT6OLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O1LhCUtQtkL1QHbIrOktxl7uQ+2MXj1XE7UEHYzkKjk=; b=OQEVPZ5UxNtgyCKcbY7mvdfkxj7IYbiP76NXRaiGV6XJ8GPVOLluYS642MQU0NKZ8/imNG7GjIa4c9PZDdTdOo3KdTvpQ/NWn2CvzWUrCrMRdA5Dl4u5L2B9bZUMbwyN+DZySeC463wy/OkkbsNcXIHYJ5TEk3Gev6Z02gHEEobiXe6bVxFYU5oTd3Qjm98MUlaJIy4UoyD8g40XPOWYcrsHG7OT1mQXjCnV6waxK8h+3nWeAFi148R3OPp56hiIBBy/Vj8jfV/0SZk2Pxc4o6XZFWqjW0hMDM5VD+Lx3q6JSc9d89I9ow30wsA8WIgPsMN8OyDO2mXkyavksqidTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from CO1PR11MB5009.namprd11.prod.outlook.com (2603:10b6:303:9e::11) by DS7PR11MB5989.namprd11.prod.outlook.com (2603:10b6:8:70::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.29; Wed, 26 Jun 2024 05:56:54 +0000 Received: from CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::b03a:b02:c24e:b976]) by CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::b03a:b02:c24e:b976%6]) with mapi id 15.20.7698.025; Wed, 26 Jun 2024 05:56:53 +0000 From: mingli.yu@windriver.com To: openembedded-core@lists.openembedded.org, Ross.Burton@arm.com Subject: [PATCH v2] acl: Fix nfs ptest failure Date: Wed, 26 Jun 2024 13:56:37 +0800 Message-Id: <20240626055637.2195328-1-mingli.yu@windriver.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TY2PR01CA0009.jpnprd01.prod.outlook.com (2603:1096:404:a::21) To CO1PR11MB5009.namprd11.prod.outlook.com (2603:10b6:303:9e::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR11MB5009:EE_|DS7PR11MB5989:EE_ X-MS-Office365-Filtering-Correlation-Id: bd31c195-d2ea-4411-2203-08dc95a4c791 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|1800799022|366014|376012|52116012|38350700012; X-Microsoft-Antispam-Message-Info: =?utf-8?q?NtIu2x+CLXvAGd9ngSVZrNKptW/4VkE?= =?utf-8?q?RXwwiZp3sAqhSywjIiYTnF4PSpSxz5VMqVkUtNtlLx4n0wDpyCMpXIYYZNHhly+2Y?= =?utf-8?q?8ZcDAXjOOzpT33kEvd7/Reqswi35DIJXRHhlnWeDRNy2waWaf9fDhER7HvZeFrhT0?= =?utf-8?q?BYF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9qseN9TjR2/iFwPMwCPLpfrFM/nySnnxAH9VP4/u0gmz0aAJ5Zl/R?= =?utf-8?q?oEjJ5Ppw3f7yF/sQKhu8KQxwTkcd9hexktqd7dr1YEW3whfY2/M+A7L8XJ7WW92iZ?= =?utf-8?q?7mLCyXat3DkCN2GGKwPh4uo6Re9BxtLCKbb/iYPIB8UncUo2RV2a3evejBt4KhCYK?= =?utf-8?q?wbgDmd/8FUZd1wETb9lB/l00X/IN/pJUQUV/MBPztF/cT5yhNbpQ2ojlbtkok/6z1?= =?utf-8?q?qxFVkOixRpWabsLiH/iklxg6Q6trB/OdNmm+fI49zIER17kIy1df4wrw=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB5009.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230038)(1800799022)(366014)(376012)(52116012)(38350700012);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kz6eeqwKZ0zvOUPCjcZzOdM2VN9y?= =?utf-8?q?TFfrb8TxLzmJzf8bEzJbyy6wsYRj/CyNPMpK0RZUDWUJe3x+yItQhrw/RYImjtTMS?= =?utf-8?q?TWTbtivMxxqwM+abPC9JkXG0wXYkXdb0r2r6rRZ8RUjyh4T9VOYoXdWoFJxw4+fCI?= =?utf-8?q?R0txDvpDKbd+Nlgopqe2BoeIgSX7BFz8EemRl2mEve+fIvvlrUH9yrIS3Ae6lN4ei?= =?utf-8?q?9oY3GLyBWvLE9cYbqCgPkSr6dOzVcFGB3IlctgnptFbP90fWx5N/dTiGqIBUBMExs?= =?utf-8?q?E5AJ+2eDIFxIMMkSeVU7TJpba6Q1VTOmKkZKPlXSGGuKVMG2W8nENbDPYG8+clF0w?= =?utf-8?q?7woaNN9hgpblqUmlXnTvdaiSesX9r+vULCZSYib0lgvM3lB6p+4QFvZJCD7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9dXeHLC78PyFrounDmvYpzgKDlURFZlaZM7hNx2Uv3+tKr8mlFbrS/K5H+CrUmj?= =?utf-8?q?lRODJNhy+K3xpBYwwlW3r8zai4GUQ1YeiF2/BklRGUWJmN3td14W5hTRQBoa73HOX?= =?utf-8?q?Ve76USjxapjXSMT75Sjp/Nb7CyE+fFz27DWfuauc4PCZgU0EZv3ML/bGzbofj486M?= =?utf-8?q?JB1K4jxFEVmR8lJpqidMqTY3vWlw6q+7ZzPacnXf+CaXKQI32IkDMsaEEqsIPcwOH?= =?utf-8?q?WHX+n1ZHw7tq?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd31c195-d2ea-4411-2203-08dc95a4c791 X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5009.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 05:56:53.6642 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +dMkfxAA8om1vtk9xZCCd5X26gnXnXnlNIjzzPyC7xcVavIy8fTax9a33WBZ4yCK5MwUmJlWLG+TRR2bO8uP1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB5989 X-Proofpoint-ORIG-GUID: rzKPyfk2JJStqMWNnSivQ49gm8g0Q-z0 X-Proofpoint-GUID: tGJyTPt_oCdOH24qNMDrVUKxPJ3Uhxch X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-26_03,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 malwarescore=0 phishscore=0 spamscore=0 impostorscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.21.0-2406140001 definitions=main-2406260044 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0064b401.pphosted.com id 45Q2FRmT002077 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 26 Jun 2024 05:57:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/201151 From: Mingli Yu * The date such as "Jun 13" should take 2 columns, so the expected check item "test/sub2" should the column 9. # ls test/sub2 -dl drwxr-xr-x 2 root root 4096 Jun 13 06:01 test/sub2 Corret the check item to fix the below failure in the test/nfsacl.test. [11] $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' -- failed drwxr-xr-x 07:23 != drwxr-xr-x test/sub2 -rw-r--r-- 07:23 != -rw-r--r-- test/sub2/blah * Use the abosulte path otherwise we won't find the expected file blah. * The calls to getgrnam_r would always fail because the size of the buffer was smaller than the minimum (170000) specified in the test implementations of getgrnam_r and getpwnam_r. Use test_get*_match directly because getpwnam and getgrnam should never fail on ERANGE. This commit fixes the following failure in the test/nfs/nfs-dir.test test: [16] $ su bin -- failed su: user bin does not exist != ~ Signed-off-by: Mingli Yu --- ...s-nfs-dir.test-Use-the-abosulte-path.patch | 46 +++++++++++++ ...s-nfsacl.test-Correct-the-check-item.patch | 51 ++++++++++++++ ...0001-tests-fix-getpwnam-and-getgrnam.patch | 67 +++++++++++++++++++ meta/recipes-support/attr/acl/run-ptest | 2 + meta/recipes-support/attr/acl_2.3.2.bb | 3 + 5 files changed, 169 insertions(+) create mode 100644 meta/recipes-support/attr/acl/0001-test-nfs-nfs-dir.test-Use-the-abosulte-path.patch create mode 100644 meta/recipes-support/attr/acl/0001-test-nfs-nfsacl.test-Correct-the-check-item.patch create mode 100644 meta/recipes-support/attr/acl/0001-tests-fix-getpwnam-and-getgrnam.patch diff --git a/meta/recipes-support/attr/acl/0001-test-nfs-nfs-dir.test-Use-the-abosulte-path.patch b/meta/recipes-support/attr/acl/0001-test-nfs-nfs-dir.test-Use-the-abosulte-path.patch new file mode 100644 index 0000000000..c48ee9f820 --- /dev/null +++ b/meta/recipes-support/attr/acl/0001-test-nfs-nfs-dir.test-Use-the-abosulte-path.patch @@ -0,0 +1,46 @@ +From e87562e4e03450e380bd1ce8e11c561e8f9653d2 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Mon, 17 Jun 2024 11:22:21 +0800 +Subject: [PATCH] test/nfs/nfs-dir.test: Use the abosulte path + +Use the abosulte path otherwise we won't find the expected file blah. + +Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/acl-devel/2024-06/msg00001.html] + +Signed-off-by: Mingli Yu +--- + test/nfs/nfs-dir.test | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/nfs/nfs-dir.test b/test/nfs/nfs-dir.test +index 33e5f5f..7216a6e 100644 +--- a/test/nfs/nfs-dir.test ++++ b/test/nfs/nfs-dir.test +@@ -14,7 +14,7 @@ EXPORT_PATH => the path that is mounted at the working directory. + Make sure the file can be accessed before. + + $ su bin +- $ cat test/blah ++ $ cat %{EXPORT_PATH}/test/blah + > blah + + Set up a situation that triggers the bug. +@@ -36,12 +36,12 @@ EXPORT_PATH => the path that is mounted at the working directory. + fail with "Stale NFS file handle" or "Input/output error". + + $ su bin +- $ cat test/blah ++ $ cat %{EXPORT_PATH}/test/blah + > blah + $ sleep 3 +- $ cat test/blah ++ $ cat %{EXPORT_PATH}/test/blah + > blah +- $ cat test/blah ++ $ cat %{EXPORT_PATH}/test/blah + > blah + + Clean up. +-- +2.34.1 + diff --git a/meta/recipes-support/attr/acl/0001-test-nfs-nfsacl.test-Correct-the-check-item.patch b/meta/recipes-support/attr/acl/0001-test-nfs-nfsacl.test-Correct-the-check-item.patch new file mode 100644 index 0000000000..f990ca4a31 --- /dev/null +++ b/meta/recipes-support/attr/acl/0001-test-nfs-nfsacl.test-Correct-the-check-item.patch @@ -0,0 +1,51 @@ +From dfc6328f02821f9c6703f764ec6f53cf81daaab6 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Mon, 17 Jun 2024 11:00:43 +0800 +Subject: [PATCH] test/nfs/nfsacl.test: Correct the check item + +The date such as "Jun 13" should take 2 columns, so the expected check +item "test/sub2" should the column 9. + # ls test/sub2 -dl +drwxr-xr-x 2 root root 4096 Jun 13 06:01 test/sub2 + +Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/acl-devel/2024-06/msg00002.html] + +Signed-off-by: Mingli Yu +--- + test/nfs/nfsacl.test | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/nfs/nfsacl.test b/test/nfs/nfsacl.test +index 4f37322..dfcc323 100644 +--- a/test/nfs/nfsacl.test ++++ b/test/nfs/nfsacl.test +@@ -8,7 +8,7 @@ The test should be run on an NFS export mount with ACL support. + $ echo blah > test/sub/blah + + $ cp -rp test/sub test/sub2 +- $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' ++ $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$9}' + > drwxr-xr-x test/sub2 + > -rw-r--r-- test/sub2/blah + +@@ -23,7 +23,7 @@ The test should be run on an NFS export mount with ACL support. + > + + $ cp -rp test/sub test/sub2 +- $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' ++ $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$9}' + > drwxrwxr-x+ test/sub2 + > -rw-r--r-- test/sub2/blah + +@@ -31,7 +31,7 @@ The test should be run on an NFS export mount with ACL support. + + $ setfacl -m u:daemon:rw test/sub/blah + $ cp -rp test/sub test/sub2 +- $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' ++ $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$9}' + > drwxrwxr-x+ test/sub2 + > -rw-rw-r--+ test/sub2/blah + +-- +2.34.1 + diff --git a/meta/recipes-support/attr/acl/0001-tests-fix-getpwnam-and-getgrnam.patch b/meta/recipes-support/attr/acl/0001-tests-fix-getpwnam-and-getgrnam.patch new file mode 100644 index 0000000000..2fea254fec --- /dev/null +++ b/meta/recipes-support/attr/acl/0001-tests-fix-getpwnam-and-getgrnam.patch @@ -0,0 +1,67 @@ +From 6398d3fe7a766b4e3cd15bb77fd0f15f7dba52b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= +Date: Wed, 19 Jun 2024 11:11:30 +0800 +Subject: [PATCH] tests: fix getpwnam and getgrnam +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The calls to these functions would always fail because the size of the buffer +was smaller than the minimum (170000) specified in the test implementations +of getgrnam_r and getpwnam_r. Use test_get*_match directly because getpwnam +and getgrnam should never fail on ERANGE. + +This commit fixes the following failure in the test/root/restore.test test: + +[21] $ chown bin passwd -- failed +chown: invalid user: ‘bin’ != ~ + +Fixes: 3737f000d3f17cd283f51eeacac21a71a3472053 ("use thread-safe getpwnam_r +and getgrnam_r") + +Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/acl-devel/2024-06/msg00000.html] + +Signed-off-by: Mingli Yu +--- + test/test_group.c | 2 +- + test/test_passwd.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/test_group.c b/test/test_group.c +index 96dd612..42d6b07 100644 +--- a/test/test_group.c ++++ b/test/test_group.c +@@ -136,7 +136,7 @@ struct group *getgrnam(const char *name) + static struct group grp; + struct group *result; + +- (void) getgrnam_r(name, &grp, buf, sizeof(buf), &result); ++ (void) test_getgr_match(&grp, buf, sizeof buf, &result, match_name, name); + return result; + } + +diff --git a/test/test_passwd.c b/test/test_passwd.c +index 9428bf8..97f2673 100644 +--- a/test/test_passwd.c ++++ b/test/test_passwd.c +@@ -119,7 +119,7 @@ int getpwnam_r(const char *name, struct passwd *pwd, char *buf, size_t buflen, + *result = NULL; + return ERANGE; + } +- last_buflen =- 1; ++ last_buflen = -1; + + return test_getpw_match(pwd, buf, buflen, result, match_name, name); + } +@@ -131,7 +131,7 @@ struct passwd *getpwnam(const char *name) + static struct passwd pwd; + struct passwd *result; + +- (void) getpwnam_r(name, &pwd, buf, sizeof(buf), &result); ++ (void) test_getpw_match(&pwd, buf, sizeof(buf), &result, match_name, name); + return result; + } + +-- +2.34.1 + diff --git a/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest index 3af75c84fe..bc7947c3ad 100644 --- a/meta/recipes-support/attr/acl/run-ptest +++ b/meta/recipes-support/attr/acl/run-ptest @@ -6,8 +6,10 @@ mkdir -p /tmp/acl-ptest/test cp test/test.* /tmp/acl-ptest/test +export EXPORT_PATH="/tmp/acl-ptest/test" set +e +rm -rf test-suite.log make test-suite.log exitcode=$? if [ $exitcode -ne 0 -a -e test-suite.log ]; then diff --git a/meta/recipes-support/attr/acl_2.3.2.bb b/meta/recipes-support/attr/acl_2.3.2.bb index 6178473873..ee86ce2cae 100644 --- a/meta/recipes-support/attr/acl_2.3.2.bb +++ b/meta/recipes-support/attr/acl_2.3.2.bb @@ -19,6 +19,9 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \ file://run-ptest \ file://0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch \ file://0001-test-patch-out-failing-bits.patch \ + file://0001-test-nfs-nfsacl.test-Correct-the-check-item.patch \ + file://0001-test-nfs-nfs-dir.test-Use-the-abosulte-path.patch \ + file://0001-tests-fix-getpwnam-and-getgrnam.patch \ " SRC_URI[sha256sum] = "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c"