[PATCH v9 2/3] testsuite: Add testcases to check dtb deployment

0 views
Skip to first unread message

Zhihang Wei

unread,
Apr 1, 2026, 6:49:14 AM (4 days ago) Apr 1
to isar-...@googlegroups.com
From: Anton Mikanovich <ami...@ilbers.de>

Build several images with dtbs deployed to the same path.

- test_dtb_deploy_distros

Same machine, different distros, same image, same kernel, same dtb
name and contents.

- test_dtb_deploy_images

Same machine, same distro, different images, same kernel, same dtb
name and contents.

Both fail with:

ERROR: mc:phyboard-mira-bookworm:isar-image-base-1.0-r0 do_copy_boot_files: The recipe isar-image-base is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
NOTE: recipe isar-image-base-1.0-r0: task do_copy_boot_files: Failed
build/tmp/deploy/images/phyboard-mira/imx6q-phytec-mira-rdk-nand.dtb
(not matched to any task)
Please verify which recipe should provide the above files.

Signed-off-by: Anton Mikanovich <ami...@ilbers.de>
---
testsuite/citest.py | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index ab28b68e..ca701422 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -677,6 +677,39 @@ class WicTest(CIBaseTest):
)


+class DtbDeployTest(CIBaseTest):
+
+ """
+ Build some targets potentially causing DTB deploy issues.
+
+ :avocado: tags=dtbdeploy,full
+ """
+
+ def test_dtb_deploy_distros(self):
+ """
+ Cover case: Same machine, different distros
+ """
+ targets = [
+ 'mc:phyboard-mira-bullseye:isar-image-base',
+ 'mc:phyboard-mira-bookworm:isar-image-base',
+ ]
+
+ self.init()
+ self.perform_build_test(targets)
+
+ def test_dtb_deploy_images(self):
+ """
+ Cover case: Same machine/distro, different images
+ """
+ targets = [
+ 'mc:phyboard-mira-bookworm:isar-image-base',
+ 'mc:phyboard-mira-bookworm:isar-image-ci',
+ ]
+
+ self.init()
+ self.perform_build_test(targets)
+
+
class NoCrossTest(CIBaseTest):

"""
--
2.39.5

Zhihang Wei

unread,
Apr 1, 2026, 6:49:14 AM (4 days ago) Apr 1
to isar-...@googlegroups.com
Image task "do_copy_boot_files" deploys kernel, initrd, and device tree
binaries to the deploy directory.

When different images for the same target (e.g., "-base" and "-debug")
are built in parallel, DTB deployment may fail because DTBs do not
contain image-specific components in their filenames, unlike the kernel
and initrd. As a result, artifacts from different builds may be written
to the same location.

Here we deploy the DTBs and other image artifacts to subdirectories,
with names of distro image encoded to the path.

Note that this results in separate copies of the same artifacts being
deployed for each image build.

Related topics on the mailing list:
https://lists.isar-build.org/isar-users/20250403170701.80774...@siemens.com/T/#u
https://lists.isar-build.org/isar-users/20240705071856.904-...@siemens.com/T/#u
https://lists.isar-build.org/isar-users/c426ad86-5cc5-42e6...@googlegroups.com/T/#u
https://lists.isar-build.org/isar-users/20240416100746.568...@mentor.com/T/#u
https://lists.isar-build.org/isar-users/DB3PR10MB690820CF3D...@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM/T/#u
https://lists.isar-build.org/isar-users/DB3PR10MB690861E70E...@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM/T/#u
https://lists.isar-build.org/isar-users/20240131144459.23...@ilbers.de/T/#u

Changes since v8:
- Rebase on next.
- Document how this approach differs from OpenEmbedded.

Changes since v7:
- Fix SOB.

Changes since v6:
- Deploy DTBs and other image artifacts into distro- and
image-specific subdirs.
- Shorten image artifact filenames.

Changes since v5:
- Fix isoimage-isohybrid-isar WIC plugin.
- Split testcases.
- Update wording.

Changes since v4:
- Rebase on next.
- Squash latest patch to first one.
- Fix deploy paths in initrd tests.

Changes since v3:
- Rebase on next.
- Fix target deploy dir path for installer.

Changes since v2:
- Patch 1: Consider also kernel suffix.
- Patch 2: Use separate testcase for possible dtb clashes.
- Minor cosmetic fixes.

Changes since v1:
- Separate `dtb-files` recipe used instead of linux one.
- Included older "[PATCH] Fix do_copy_boot_files error" into the
series.

Anton Mikanovich (2):
wic: Obtain real machine name in isoimage source plugin
testsuite: Add testcases to check dtb deployment

Zhihang Wei (1):
meta: Deploy image build artifacts into distro- and image-specific
subdirs

RECIPE-API-CHANGELOG.md | 77 +++++++++++++++++++
.../installer-add-rootfs.bbclass | 9 ++-
meta/classes-recipe/image.bbclass | 11 +--
.../imagetypes_container.bbclass | 2 +-
meta/classes-recipe/imagetypes_wic.bbclass | 2 +-
meta/conf/bitbake.conf | 3 +-
.../plugins/source/isoimage-isohybrid-isar.py | 6 +-
testsuite/cibase.py | 2 +-
testsuite/citest.py | 40 +++++++++-
testsuite/start_vm.py | 2 +-
10 files changed, 135 insertions(+), 19 deletions(-)

--
2.39.5

Zhihang Wei

unread,
Apr 2, 2026, 12:04:20 PM (3 days ago) Apr 2
to isar-...@googlegroups.com
Applied to next.

Zhihang
Reply all
Reply to author
Forward
0 new messages