From patchwork Thu Jun 27 07:03:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yu, Mingli" X-Patchwork-Id: 45679 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 0C9BFC2BD09 for ; Thu, 27 Jun 2024 07:04:01 +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.2298.1719471840289205453 for ; Thu, 27 Jun 2024 00:04:00 -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=69087085fa=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 45R4q9Gg001704 for ; Thu, 27 Jun 2024 07:03:59 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3ywktwvqyp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 27 Jun 2024 07:03:59 +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 45R73wPi023439 for ; Thu, 27 Jun 2024 07:03:58 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3ywktwvqym-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Jun 2024 07:03:58 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TsWrtY6OvQdTMPfSXlgmn8dWVMMhU60m4YmC2rnMx0i9acq4DX8RMyYB/ddKyMRjzFvK5RGERBsKwFbp6yNIMnvZDe0MYxE67eVJfkjIMw3+loKqQD0Aw03rbAwiXHzxNz+W+wp1ZPJTfnKVkAkcsxwJKJj3OYnaes0guAoch4VWilELXEzBMOtAxg8GXs8BOhrqDc0o0/ak3VDhh1npnT2GqtxUBY7eO/CyNfC1pYgncaSxX9dAY6k8nFZyBpkJIeY+wnFeukKvOJSfo6Gzgere4U44AVA4jsEcyBVn1mJTqLGu9HFZ+FIAbcQ+u6KFSrhPw3BmHCcLY6DuguV55g== 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=NXD/T8Y+uFvKxsxSoEOXOee5u3iyMorFwIK2+oEUuhM=; b=V+iIL4LgbByyRt9hR6Sj6WxYMhJR6fSDUPfFWtKPZdjm0BHGm3CR8uEtFJXW1gVRHfv0KF6fWzK4swWQILMWe4LPIbt8iOB1gyl54mMq39rZefFhe0QfA8yZSBoVZeQ+55hXbip38Su/M98tipWNDtNcvMf2GfpW7Mbk600QggsdOYuqXVHatXysb9nlP34lhEU3RljQwd3srN0RsSR0eZadHQ2XSaiFm6aWUCMiGyFEEWKJtm//fdrLy7xc8j+jBHFHky1dkbzTPisXkueLN+9dJGa+1svMrrjl/xZzycAen3P00y8q2o43z31h73InBNV7N3oM/eQ6N+I1dY91Kw== 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 SA3PR11MB7528.namprd11.prod.outlook.com (2603:10b6:806:317::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Thu, 27 Jun 2024 07:03:56 +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; Thu, 27 Jun 2024 07:03:56 +0000 From: mingli.yu@windriver.com To: openembedded-core@lists.openembedded.org, alexandre.belloni@bootlin.com Subject: [PATCH v3] acl: Fix nfs ptest failure Date: Thu, 27 Jun 2024 15:03:39 +0800 Message-Id: <20240627070339.2066255-1-mingli.yu@windriver.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYCP286CA0265.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:455::17) To CO1PR11MB5009.namprd11.prod.outlook.com (2603:10b6:303:9e::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR11MB5009:EE_|SA3PR11MB7528:EE_ X-MS-Office365-Filtering-Correlation-Id: e7550fe0-3bb7-47d3-95a9-08dc96774fb9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?GMzLuZy0mbSD/78IOEAwhzU2w4amBnT?= =?utf-8?q?KZljVeWDVqPV/zIjV7UZtU5mAf/8Revgq80IzObGqYqCCqXWMnr46LGXMQpfemHaf?= =?utf-8?q?RmMBGp3zreTKdzbUBNQI9TjsieuyiQVlxzy8ZtSFuccHAgUuClddERS4wnMS2SVoF?= =?utf-8?q?7N2Rkpps9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kOabmKxNxdVONP2LH7PYMIQVqatmmL5LHEfhjfHRuTht0rFJO4afNlZfvS10tD?= =?utf-8?q?HobPO2Ndl4+Hiw1Bwr9fdXhUUviXglRIKjnhUfn6zReCPpEiEVvsndhBWIMEutitF?= =?utf-8?q?hmP09bk22P0ti6REphCz0q08jad7C08f9SYh7xvFdXl13/YXk8th5izxhybdcKgjf?= =?utf-8?q?nVSH3MTDjJXNFf0fRndSqCG1miVpzLqPO7Ud0W/000DGJiCVk/cz5A6IW4Q7zn4gZ?= =?utf-8?q?QLdBbwI2MCLF2KUQDAkXmb0LpKf2C7F8YdHfM8rwqbNMqiCx/aKrXyfc=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:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iv/OcQF1HYeB7aFuH8aDKwUDbnjd?= =?utf-8?q?CsCZDcvQwJTcMt1szlIQSGaFbsc4lt9v0y6wtPE7xMaH0YwoRq0ujhXAtipvtU0mH?= =?utf-8?q?VHcbs57BxvRhn5wpOuoggPD48tQOSHFT74AfCe9mKr8jqjkeyoC8SwhdavwMeaDAs?= =?utf-8?q?2JJeeaItNMRDbKAYz0hG/f7utSucV6s3U6fJqDKb1Z6kamDACeU5NBXZHGiE9rJW9?= =?utf-8?q?oqbouCNa+lu2QVs2DBHaIw9l9Nj+6SQ4/fXN5Aqttg2KvszQYycRaGleSywKt1k3/?= =?utf-8?q?7fisPZzIHWIqMDN706XVqNvtRSFn+rNZnwsiAkaEG9QtTEpwiM0NoCIQLjJ68/wF1?= =?utf-8?q?mKDGXotQg8UKssoLbssTaIC01SSIIgy5Eh7TGjpvEJ93wE3wGCCoFl2UmLeJEWEA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q?+AoqYfiUl8VdYi8mDVf3I4/WNfEbF5p6pDnAOepBkjs9nJiHGQwj97zcUnoRELb6s?= =?utf-8?q?bq8Dd5plDa8OMi9nvSnKeT+tio7hOLMmIPSBx2NC3mEPis3qEfBMNHl8Y+mToStaz?= =?utf-8?q?Lk/GYvt2fDnF7dYYdc8+zmUsv+Am3khmxh9GQryJSHcerweX2V+v1+YlsRaYhSSam?= =?utf-8?q?eNvqDompxJG/eNdBVRYjjfWKmCKmEZM11fKfQd8dQ/q8q+47wV/w+NfarauLiekyi?= =?utf-8?q?zAMu2LGr9WGe?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7550fe0-3bb7-47d3-95a9-08dc96774fb9 X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5009.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 07:03:56.4513 (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: crtoQvdXnUTS4xLCn0KxRxrGtZh3V5Ex1HLxdXCsK8ga0ykl5jl0P5LuU5UznGJ20ZkqDWwsDCt9QYvdE1+bhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7528 X-Proofpoint-ORIG-GUID: c9hMz_F8K6Bi1LUhriFwuMC_F0faMPDk X-Proofpoint-GUID: 1Qgdd-_PtjFuMoll2UMPHu5KPgqIyLKn 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-27_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-2406270052 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0064b401.pphosted.com id 45R4q9Gg001704 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 ; Thu, 27 Jun 2024 07:04:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/201188 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 != ~ * Add attr which provides getfattr to RDEPENDS:${PN}-ptest to fix below test/nfs/nfsacl failure. [19] $ getfattr -m- test/sub -- failed\n' 'Can\'t exec "getfattr": Nosuch file or directory at ./test/run line ' 369, line 24. != # file: test/sub\n' 'getfattr: No such file or directory != system.posix_acl_access\n' '~ != system.posix_acl_default\n' '~ 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 | 4 ++ 5 files changed, 170 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..5ac085c322 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" @@ -65,6 +68,7 @@ do_install_ptest:append:libc-musl() { } RDEPENDS:${PN}-ptest = "acl \ + attr \ bash \ coreutils \ perl \