From: Thomas Roos <roosesweb@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Paul Barker <paul@pbarker.dev>
Subject: [PATCH v2 5/5] oeqa/selftest/imagefeatures: test an empty IMAGE_LINK_NAME
Date: Wed, 19 Aug 2026 08:22:08 +0200 [thread overview]
Message-ID: <20260819062208.680468-6-roosesweb@gmail.com> (raw)
In-Reply-To: <20260819062208.680468-1-roosesweb@gmail.com>
Nothing covered this configuration, which is why the vex, multiubi and
testexport sites went unnoticed. One core-image-minimal build with
IMAGE_LINK_NAME cleared covers all three; the test fails without them.
AI-Generated: Uses Claude Opus 5
Signed-off-by: Thomas Roos <roosesweb@gmail.com>
---
meta/lib/oeqa/selftest/cases/imagefeatures.py | 42 +++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 87c3da2..fac1d47 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -332,3 +332,45 @@ CORE_IMAGE_EXTRA_INSTALL = "man-pages"
status, output = qemu.run_serial("man --pager=cat intro")
self.assertEqual(status, 1, 'Failed to run man: %s' % (output))
self.assertIn("introduction to user commands", output)
+
+ def test_empty_image_link_name(self):
+ """
+ Test that an empty IMAGE_LINK_NAME suppresses the artifact symlinks
+ and that the classes reading an artifact back still locate it.
+ """
+ image = 'core-image-minimal'
+ vname = 'mtd_4_256'
+ config = """
+INHERIT += "vex"
+IMAGE_CLASSES += "testexport"
+IMAGE_LINK_NAME = ""
+IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}"
+IMAGE_FSTYPES += "multiubi"
+MULTIUBI_BUILD = "%s"
+MKUBIFS_ARGS_%s ?= "-m 4096 -e 253952 -c 4096"
+UBINIZE_ARGS_%s ?= "-m 4096 -p 256KiB"
+TEST_TARGET_IP = "192.168.7.2"
+TEST_SERVER_IP = "192.168.7.1"
+""" % (vname, vname, vname)
+ self.write_config(config)
+
+ bitbake(image)
+ bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_NAME', 'TEST_EXPORT_DIR'], image)
+ deploy_dir = bb_vars['DEPLOY_DIR_IMAGE']
+
+ # Artifacts are still named after IMAGE_NAME
+ for name in ("%s.vex.json" % bb_vars['IMAGE_NAME'],
+ "%s_%s.ubifs" % (bb_vars['IMAGE_NAME'], vname)):
+ self.assertTrue(os.path.exists(os.path.join(deploy_dir, name)),
+ "%s is missing from %s" % (name, deploy_dir))
+
+ # ...and nothing is linked from the suffix alone
+ for name in (".vex.json", "_%s.ubifs" % vname, "_%s.ubi" % vname):
+ self.assertFalse(os.path.lexists(os.path.join(deploy_dir, name)),
+ "%s was created from an empty IMAGE_LINK_NAME" % name)
+
+ # testexport copies these back out of DEPLOY_DIR_IMAGE
+ bitbake("-c testexport %s" % image)
+ for name in ('manifest', 'testdata.json'):
+ path = os.path.join(bb_vars['TEST_EXPORT_DIR'], 'data', name)
+ self.assertTrue(os.path.exists(path), "%s was not exported" % path)
--
2.55.0
next prev parent reply other threads:[~2026-08-19 6:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 11:24 [PATCH] classes/sbom-cve-check: fall back to the stable SBOM symlink roosesweb
2026-08-17 19:10 ` Paul Barker
2026-08-19 6:22 ` [PATCH v2 0/5] Handle an empty IMAGE_LINK_NAME consistently Thomas Roos
2026-08-19 6:22 ` [PATCH v2 1/5] sbom-cve-check: read the image SBOM through the stable symlink Thomas Roos
2026-08-19 6:22 ` [PATCH v2 2/5] vex: skip the VEX symlink when IMAGE_LINK_NAME is empty Thomas Roos
2026-08-19 6:22 ` [PATCH v2 3/5] testexport: fall back to IMAGE_NAME " Thomas Roos
2026-08-19 6:22 ` [PATCH v2 4/5] image_types: skip multiubi symlinks " Thomas Roos
2026-08-19 6:22 ` Thomas Roos [this message]
2026-08-19 6:30 ` [PATCH] classes/sbom-cve-check: fall back to the stable SBOM symlink Thomas Roos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260819062208.680468-6-roosesweb@gmail.com \
--to=roosesweb@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul@pbarker.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox