new file mode 100644
@@ -0,0 +1,14 @@
+#!/bin/sh
+# This software is a part of Isar.
+# Copyright (C) 2026 Siemens AG
+#
+# SPDX-License-Identifier: MIT
+
+set -eu
+
+if [ "$#" -ne 2 ]; then
+ echo "usage: test-wic-signing INPUT OUTPUT" >&2
+ exit 2
+fi
+
+cp "$1" "$2"
new file mode 100644
@@ -0,0 +1,19 @@
+# This software is a part of Isar.
+# Copyright (C) 2026 Siemens AG
+#
+# SPDX-License-Identifier: MIT
+#
+# Test-only signer for exercising WIC's imaging-chroot command runner.
+# This copies the input file, it does not create a cryptographic signature.
+
+DPKG_ARCH = "any"
+SRC_URI = "file://test-wic-signing"
+
+MAINTAINER = "isar-users <isar-users@googlegroups.com>"
+
+inherit dpkg-raw
+
+do_install[cleandirs] = "${D}/usr/libexec/isar-test-wic-signing"
+do_install() {
+ install -m 0755 ${WORKDIR}/test-wic-signing ${D}/usr/libexec/isar-test-wic-signing
+}
new file mode 100644
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: MIT
+#
+# Test-only WIC layout for the imaging-chroot signing-script lookup.
+part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi,signwith=/usr/libexec/isar-test-wic-signing/test-wic-signing" --ondisk sda --label efi --part-type EF00 --align 1024 --use-uuid
+part / --source rootfs --ondisk sda --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/
+
+bootloader --ptable gpt --timeout 3 --append "rootwait console=ttyS0,115200 console=tty0"
@@ -978,6 +978,22 @@ class WicTest(CIBaseTest):
compat_arch=False,
)
+ def test_wic_signing_script(self):
+ targets = ['mc:qemuamd64-trixie:isar-image-base']
+ signer = '/usr/libexec/isar-test-wic-signing/test-wic-signing'
+ if os.path.exists(signer):
+ self.fail(f"WIC signing test requires {signer} to be absent on the host")
+
+ self.init()
+ self.perform_build_test(
+ targets,
+ lines=[
+ 'WKS_FILE = "test-wic-signing.wks"',
+ 'IMAGER_BUILD_DEPS += "test-wic-signing"',
+ 'IMAGER_INSTALL:wic += "test-wic-signing"',
+ ],
+ )
+
class DtbDeployTest(CIBaseTest):
WIC plugins run on the host, while commands launched through WIC_TOOL_RUNNER run in the imaging chroot. A host-side os.path.exists() check can therefore report a signer as missing even when it is present in the chroot. This adds a WIC build test that installs a copy-only signer in the imaging chroot and selects it with the EFI boot partition's signwith parameter. The test requires the unique signer path to be absent on the host, as it exercises the host/chroot mismatch. The runner-aware lookup checks for the signer, exec_cmd() then invokes it. The test does not check cryptographic signing. Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com> --- .../test-wic-signing/files/test-wic-signing | 14 ++++++++++++++ .../test-wic-signing/test-wic-signing.bb | 19 +++++++++++++++++++ meta-test/wic/test-wic-signing.wks | 7 +++++++ testsuite/citest.py | 16 ++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 meta-test/recipes-app/test-wic-signing/files/test-wic-signing create mode 100644 meta-test/recipes-app/test-wic-signing/test-wic-signing.bb create mode 100644 meta-test/wic/test-wic-signing.wks