From patchwork Thu Jul 23 08:11:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamin Lin X-Patchwork-Id: 93315 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 152E5C531CB for ; Thu, 23 Jul 2026 08:11:39 +0000 (UTC) Received: from TYPPR03CU001.outbound.protection.outlook.com (TYPPR03CU001.outbound.protection.outlook.com [52.101.126.87]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.18795.1784794286963932835 for ; Thu, 23 Jul 2026 01:11:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@aspeedtech.com header.s=selector1 header.b=nifRXY+C; spf=pass (domain: aspeedtech.com, ip: 52.101.126.87, mailfrom: jamin_lin@aspeedtech.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZYU/dVxv9rP+6qr3u0z0HAgaAnPqr31zJTffCu4ubO72UU41vnp19+omNtXXgj+GPCYrt5EBCMihUSJKfK3lyfALNFxjW3HojCXLoCQ1V14c/zcjScDb7HUS6QGL8Hf5K/8PvO3aAa/hX5+4F+QkUO5yCBW8+mQJlNBRCaeEESgH5j3+nL8aKcU5u4rLPdU/83u129BnQ4wBaXC00BZ8nAJygEbHlTbNCCvsHLZ5WTvBJc2diliybsRLLEID5bc1R4zLdGsqiP3hWPUmcZs1otY0vVwinxJKdN98yrN5LydpVXMubAZI9w8NeRxUmHqoJW0ULPpeRy1Ds1XClKdB1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=lq9ZO7jNxShRdTtNupaMSsnhfAFVXlXBEyaRApRWRx0=; b=kW1gCElGhpb+nA5rk0Qzm4hunqrrotZVXvtLuhRRKsbgpENGVDbqH27PBBXX50uWXACZcKMOi1JLL4VCnH2RLXstGHiP8+SH7wv6Cv1pDe0ckEWtzigNnFH/jncJ43YsWqy5BDsGlO+f2x1BSBAmhLEHpNAdH6DeNirCVjzs0LfyzjmKmN/u2pGrb2wOEq3Yu8Aqji0oSzcg2oGZVv7ZtEMpgUTCld6o6dd/mWtXEZRVJsOsP7OfJ3ozfaKjzZoUz3Y1TNn/fGomzHgFY+1ZU+Z//ViO6ICSrcNfB7MnLwzY5Hi71p2cspujlxFugzSdVz11o87iORDuAdoUugFM7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aspeedtech.com; dmarc=pass action=none header.from=aspeedtech.com; dkim=pass header.d=aspeedtech.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aspeedtech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lq9ZO7jNxShRdTtNupaMSsnhfAFVXlXBEyaRApRWRx0=; b=nifRXY+CO9lA/5n33PH8cxGF//Qagu21WHJEhpYllu0Ty3ED4VkMZKtE59Bamt69ZkABkRAK6yimmUwynPTVYnyKQzgO4CQRvc1VlClIvLAKx4Ope3NvxmAsxE59c4RZUlGjlI/fHqsDaLdZftC2pSsExobL+N1DgO+HNj9xrp/X3K8rEwz65QgOWTzJmpBA4rKoAgjgwfWaeDbHf0kRUc1KYEOEaPfs/4HBJgKLx7Vglk1IahPl6419Tky6Mic7l5oHutfq3jAbtqvPAAQBFLUVd4ymef0FYTtyQxMNxwalNncI72va6QeuLg1++P1XPLI1NjZcwX88tYCbq+kyhg== Received: from TYZPR06MB4980.apcprd06.prod.outlook.com (2603:1096:400:1cc::10) by SEZPR06MB5022.apcprd06.prod.outlook.com (2603:1096:101:48::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.10; Thu, 23 Jul 2026 08:11:27 +0000 Received: from TYZPR06MB4980.apcprd06.prod.outlook.com ([fe80::ea8a:7cb7:4822:2fb3]) by TYZPR06MB4980.apcprd06.prod.outlook.com ([fe80::ea8a:7cb7:4822:2fb3%6]) with mapi id 15.21.0245.009; Thu, 23 Jul 2026 08:11:27 +0000 From: Jamin Lin To: "openembedded-core@lists.openembedded.org" , "alex.kanavin@gmail.com" , "paul@pbarker.dev" CC: Troy Lee , Jamin Lin Subject: [PATCH v3 5/5] oeqa/selftest/devtool: Add test for multiple nested git destsuffix repos Thread-Topic: [PATCH v3 5/5] oeqa/selftest/devtool: Add test for multiple nested git destsuffix repos Thread-Index: AQHdGnrbSugve8qM9E2N78daPQFmXg== Date: Thu, 23 Jul 2026 08:11:25 +0000 Message-ID: <20260723081118.1558249-6-jamin_lin@aspeedtech.com> References: <20260723081118.1558249-1-jamin_lin@aspeedtech.com> In-Reply-To: <20260723081118.1558249-1-jamin_lin@aspeedtech.com> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=aspeedtech.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TYZPR06MB4980:EE_|SEZPR06MB5022:EE_ x-ms-office365-filtering-correlation-id: 3b647c42-d877-4557-1987-08dee891fe6f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|376014|23010399003|1800799024|366016|22082099003|18002099003|38070700021|10067099003|56012099006|3023799007; x-microsoft-antispam-message-info: avpuFYOkzAdHVMkCscVpEC8EUIqM43/pLc3nmqx4fVB7FDX1TKpBOCEL2AWJF0biVpHkw3QSQjbwaTuOMOFOaFLLjpS4kD+ZysVJc30lnr6jklUwfqImSkOwRRLr9ELbQ/uT3NcEIzEFhhAoeyuwuB45NNwiuw/LjCeL6WtbqAG72DmYiwCcDmneZcgDLgOLYa98vP8HfwWRZlq0cdh8LYYX1nm7xwhXa90/isN5AiXbHhrUL3td8JYspz+OtGQ6P0SKX02jG/QpQH/9Dzofcnm5klGMAoztW1fsOH/7lEdexJOyUTSQ8ZxAhw/2mgCJ45PGfe3N+GqQZWpOgahEHe+hIkgnJYefjX7xZI/kKnKpY3S7mW7UdBMevthnhRw44NMmJdjGCL+QUIxGwEhXvUFCZraYnO49KVak+3p5fv8EQaJq+aohQJg5Fm0xwdSq1mZgYo4ECA6xyv/8LQROFanByVUrE+cX68eO+BRi6w+Br0WVft+HgaHtPaOSeVKkuo1ZZ+d/z+Km4ydTr2ZkmsaiU0SFio5cZJmSR95U51rTkhSrU8i4y/FsXbqhmVfPVI85/UAWTWA0MjnFI4AdNRezI6dRY7yDNm5ekG6xHFS8C5gkJR66jpxooHZbVeJiNHt+XT29SOBO6z4BB9GnHc6/fysd7pBPWYYSYNyyyHocV43aVLBqOpKuW82i57sXI91aV6iw6bb8iaFYhVILF2RBPNJmT8nFGjInfqpxdyg= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB4980.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(23010399003)(1800799024)(366016)(22082099003)(18002099003)(38070700021)(10067099003)(56012099006)(3023799007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: jxcD4q2V7cg6jFKhqF+oTygRz1VYa2Dq1so62ZQ8tFzoaxtmHhVLKCMBSZ7qbRrz5lN2rpDPosFsMqAxD69b/LhicwxsTe0yiRtMhZUyB9LCNhP+QHAUovKMJX5bGQlzXf7eNIhWxuokiMfWEcUDKyoC6IX1p1aBf21z0Rds4aLH+A42PvQ8o4udr0Cj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BQlF+9Twk9oZt9yzU0rH9cNuY8qj5hE/5yDNC6VabuWZKx9nVfMwPQC8K10rYKh2QIuVuWX2hQFG2ByroKl04uUeXmjJd/c3q58BCbynJldnLVYSCFahlZ2SHrHrFuvTtph8pHHpRLy2GiIEcbEWguISlhpeIff66NLDsBS8Jk1JBvvfX5Lbmg7XPOLD2mncJt+nfgH0xi8JlZNQX8V+SZbBmGT8tvqRbGpBpr4tB2n7xRim3v+Ka53d6GWZAoLEjCOsfEbfSSlFq8/qAexfniPlfxs4nW9OFY83KY7r2f40F46vZUj4gIuK8KXoXzCZ1G4Hf7kBaTw8R17TYekmIptIppclcrx0fYPF9RIPDXTHzqOPM8vXZYX9qntcBTQUum/PFhhFU37p7m8/s0lFT49Ug1ex9pJPXkSNwCK5/RenGLQPuSi2+gC10Uon/sNSMKz0dI0TE9A3sKgCwimPgVqChbhWvk3j0/72dYsz/NJ5UQ== MIME-Version: 1.0 X-Exchange-RoutingPolicyChecked: dWVFRZtT316TjVoKOYN/0owd/POUhmJrJlt4T8lapZiFZNZcUGIePeRrHesoJyAwFw7VDrXuA+lM2cF1lB96LwG5rnJnuE1dAaZKg76JggG3yNOpzJvPMCvAf0vB5suSP5fpX1rZ/eNFhR434ybRy/PUgG9P78KetOZyKB/b/uatZgt+Duvn57xIUv1yZvsbAc8s0oZhFhOv4X/d4iWhzcjOHLOJC1pt98wcg7ZTNYJd95PgkywFYAIGduUe/5V5UV1lItGr0qZSux5IZBDSzSPNL+34vamczSLXhOUPuTxwSygncEv4w7/rd+fn96zVzS09zbUW+wWZAoeLlLVoEw== X-OriginatorOrg: aspeedtech.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB4980.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b647c42-d877-4557-1987-08dee891fe6f X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2026 08:11:25.7635 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43d4aa98-e35b-4575-8939-080e90d5a249 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: D3e6ac2kKVGXSEfVZ6O74orr1TP173DYjTnYVpKy70dquKZp3CF0OzCgalu0klHiWrHNGe8fr9LTdvhudZXLhno7MA75vgSHgKABSxcYrTY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5022 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 23 Jul 2026 08:11:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241788 Add test_devtool_modify_multi_git_destsuffix_standalone to verify that devtool modify converts all nested git repos (from multiple SRC_URI git entries with different destsuffix values, including a repo nested inside another repo's own working tree) to standalone clones so the workspace survives 'bitbake -c cleanall'. Signed-off-by: Jamin Lin --- meta/lib/oeqa/selftest/cases/devtool.py | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index a10eb0c784..de73a2e620 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -1265,6 +1265,70 @@ class DevtoolModifyTests(DevtoolBase): self.assertExists(os.path.join(source_repo_gitsm_gitmodules, 'bitbake'), 'Submodule not found') self.assertExists(os.path.join(source_repo_gitsm_gitmodules, 'bitbake-gitsm-test1'), 'Submodule not found') + def test_devtool_modify_multi_git_destsuffix_standalone(self): + """ + Verify that devtool modify converts all nested git repos (from multiple + SRC_URI git entries with different destsuffix values) to standalone clones + so that 'bitbake -c cleanall' does not break the devtool workspace. + + The recipe (devtool-test-multi-destsuffix) has three git SRC_URI entries + with S = ${UNPACKDIR}, each nested inside the previous repo's own + working tree: + destsuffix=level1 -> srcdir/level1/ + destsuffix=level1/level2 -> srcdir/level1/level2/ + destsuffix=level1/level2/level3 -> srcdir/level1/level2/level3/ + + This mirrors real-world recipes that embed multiple module repos + as nested subdirectories of the primary source tree, including the + case where one repo's checkout lives inside another repo's working + tree rather than merely under a shared plain directory. + """ + testrecipe = 'devtool-test-multi-destsuffix' + src_uri = get_bb_var('SRC_URI', testrecipe) + self.assertIn('git://', src_uri, + 'This test expects %s to have git SRC_URI entries' % testrecipe) + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('devtool reset %s' % testrecipe) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + result = runCmd('devtool modify %s' % testrecipe) + self.assertEqual(result.status, 0, + 'devtool modify failed: %s' % result.output) + srcdir = os.path.join(self.workspacedir, 'sources', testrecipe) + nested_paths = [ + ('level1', 'level1'), + ('level2', 'level1/level2'), + ('level3', 'level1/level2/level3'), + ] + + for name, subpath in nested_paths: + repo_path = os.path.join(srcdir, subpath) + self.assertExists(os.path.join(repo_path, '.git'), + 'Repo %s (.git) not found in devtool workspace' % name) + + # Key assertion: no nested repo should retain a git alternates file. + # devtool modify must repack objects locally so the workspace does not + # depend on the downloads cache, which 'bitbake -c cleanall' will delete. + for name, subpath in nested_paths: + repo_path = os.path.join(srcdir, subpath) + alternates_file = os.path.join(repo_path, '.git', 'objects', + 'info', 'alternates') + self.assertNotExists(alternates_file, + 'Repo %s still has a git alternates file after ' + 'devtool modify' % name) + + # Verify the workspace survives cleanall, which removes the shared + # objects in the downloads cache that alternates would reference. + bitbake('%s -c cleanall' % testrecipe) + + # After cleanall all repos must still be usable. + # A broken alternates file would cause git operations to fail. + for name, subpath in nested_paths: + repo_path = os.path.join(srcdir, subpath) + result = runCmd('git status', cwd=repo_path) + self.assertEqual(result.status, 0, + 'git status failed in repo %s after cleanall: %s' + % (name, result.output)) + class DevtoolUpdateTests(DevtoolBase): def test_devtool_update_recipe(self):