eBPF-based security platform
testing: store generated VM files beside the fixture scripts
KP Singh5e38612f338a
diff --git a/contrib/test-vm.sh b/contrib/test-vm.shindex 79d7d23b..0280df42 100755--- a/contrib/test-vm.sh+++ b/contrib/test-vm.sh@@ -971,18 +971,10 @@ build_initrd()"$REPO_ROOT/systemd/shirudo-initrd.service.in" >"$unit"seed="$RUN_DIR/initrd-seed"mkdir -p "$seed/usr/lib/systemd/system/initrd.target.wants"- cat >"$seed/usr/lib/systemd/system/shirudo-test-seed.service" <<'EOF'-[Unit]-Description=shirudo test VM: seed the root file system with the bundle-DefaultDependencies=no-After=initrd-root-fs.target-Before=shirudo-initrd.service-RequiresMountsFor=/sysroot--[Service]-Type=oneshot-ExecStart=/bin/sh -c 'mkdir -p /sysroot/usr/local/bin /sysroot/var/lib/shirudo/keys/trusted && cp /usr/local/bin/shirudo /sysroot/usr/local/bin/shirudo && chmod 0755 /sysroot/usr/local/bin/shirudo && cp /etc/shirudo/keys/cert.der /sysroot/var/lib/shirudo/keys/cert.der && cp /etc/shirudo/keys/trusted/* /sysroot/var/lib/shirudo/keys/trusted/ && chmod 0700 /sysroot/var/lib/shirudo /sysroot/var/lib/shirudo/keys /sysroot/var/lib/shirudo/keys/trusted'-EOF+ cp "$REPO_ROOT/contrib/verity-vm/shirudo-test-seed.service" \+ "$seed/usr/lib/systemd/system/shirudo-test-seed.service"+ cp "$REPO_ROOT/contrib/verity-vm/seed-root.sh" \+ "$seed/shirudo-test-seed-root.sh"ln -sf ../shirudo-test-seed.service \"$seed/usr/lib/systemd/system/initrd.target.wants/shirudo-test-seed.service"# The bundle's own-keyring certificate rides along as a second@@ -1004,9 +996,10 @@ EOF"$seed/shirudo-test-images/"cp "$TEST_VM_HOST_BUNDLE/verity/bootstrap.conf" \"$seed/shirudo-test-images/bootstrap.conf"- cat >>"$seed/usr/lib/systemd/system/shirudo-test-seed.service" <<'EOF'-ExecStart=/bin/sh -c 'mkdir -p /sysroot/var/lib/shirudo/images /sysroot/etc/shirudo && cp /shirudo-test-images/*.img /shirudo-test-images/*.verity /shirudo-test-images/*.roothash /shirudo-test-images/*.p7s /sysroot/var/lib/shirudo/images/ && cp /shirudo-test-images/bootstrap.conf /sysroot/etc/shirudo/shirudo.conf'-EOF+ cp "$REPO_ROOT/contrib/verity-vm/seed-images.sh" \+ "$seed/shirudo-test-seed-images.sh"+ cat "$REPO_ROOT/contrib/verity-vm/shirudo-test-seed-images.conf" \+ >>"$seed/usr/lib/systemd/system/shirudo-test-seed.service"ficert="$RUN_DIR/cert.der"cp "$TEST_VM_HOST_BUNDLE/fixtures/cert.der" "$cert"diff --git a/contrib/verity-vm-bundle.sh b/contrib/verity-vm-bundle.shindex 6bf2c139..a7ecaa0b 100755--- a/contrib/verity-vm-bundle.sh+++ b/contrib/verity-vm-bundle.sh@@ -4,6 +4,7 @@set -euo pipefailsource_dir=$(cd "$(dirname "$0")/.." && pwd)+templates="$source_dir/contrib/verity-vm"[ "$#" -eq 4 ] || exit 2bundle=$1work=$2@@ -13,12 +14,8 @@ boot_keys=$4--boot-keys-dir "$boot_keys" --output "$work/verity"mkdir "$bundle/verity"cp -a "$work/verity/public/." "$bundle/verity/"-cat >"$work/runtime.conf" <<'EOF'-config.image = /var/lib/shirudo/images/config-boot-keys-config.verification_key = /run/shirudo/runtime/etc/shirudo/config-cert.der-config.pcr = 14-tpm.tcti = device:/dev/tpmrm0-EOF+sed 's/@config_image@/config-boot-keys/g' "$templates/runtime.conf.in" \+ >"$work/runtime.conf""$source_dir/tools/gen-image/shirudo-gen-runtime" \--binary "$bundle/root/usr/local/bin/shirudo" \--bootstrap-conf "$work/runtime.conf" --cert "$keys/cert.der" \@@ -28,12 +25,14 @@ EOF--extra-binary "$source_dir/build/verity-tests/shirudo-image-fault" \--unit-output "$bundle/verity/runtime-service.conf" \>"$bundle/verity/runtime.root"-printf 'runtime.image = /var/lib/shirudo/images/runtime\nruntime.root_hash = %s\n' \- "$(cat "$bundle/verity/runtime.root")" >"$bundle/verity/bootstrap.conf"+sed "s/@root_hash@/$(cat "$bundle/verity/runtime.root")/g" \+ "$templates/bootstrap.conf.in" >"$bundle/verity/bootstrap.conf"command=$(sed -n 's/^ExecStart=\(.*\) init$/\1/p' \"$bundle/verity/runtime-service.conf")[ -n "$command" ]-printf '#!/bin/sh\nexec %s "$@"\n' "$command" >"$bundle/verity/shirudo-runtime"+command_escaped=$(printf '%s' "$command" | sed 's/[\&|]/\\&/g')+sed "s|@runtime_command@|$command_escaped|g" "$templates/shirudo-runtime.in" \+ >"$bundle/verity/shirudo-runtime"chmod 0755 "$bundle/verity/shirudo-runtime"(cd "$bundle/verity" && sha256sum -- *.img *.verity *.roothash *.p7s *.der \*.fingerprint *.upatch bootstrap.conf runtime-service.conf shirudo-runtime >manifest)diff --git a/contrib/verity-vm-config-fixtures.sh b/contrib/verity-vm-config-fixtures.shindex 320e6943..7c4fc49a 100755--- a/contrib/verity-vm-config-fixtures.sh+++ b/contrib/verity-vm-config-fixtures.sh@@ -6,6 +6,7 @@ set -euo pipefailumask 077source_dir=$(cd "$(dirname "$0")/.." && pwd)+templates="$source_dir/contrib/verity-vm"keys_dir=boot_keys_dir=output=@@ -69,23 +70,18 @@ for name in config-boot-keys config-live-new-key config-a config-b config-bad co[ "$name" != config-builtin ] || [ -n "$builtin_key" ] || continueroot="$output/source/$name"mkdir -p "$root/etc/shirudo" "$root/keys/trusted" "$root/keys/revoked"- printf 'eventlog.max_bytes = 0\nmap_export.tenant_id = %s\n' "$name" \+ sed "s/@tenant@/$name/g" "$templates/config.conf.in" \>"$root/etc/shirudo/shirudo.conf"case "$name" inconfig-tree-*)mkdir -p "$root/etc/shirudo/bpm"- printf 'env=tree-test\n' >"$root/etc/shirudo/node.labels"- printf 'endpoint = oci://127.0.0.1:5443/shirudo/upatch-tree\nreference = %s\n' \- "${name#config-tree-}" >"$root/etc/shirudo/bpm/upatch-tree.conf"+ cp "$templates/node.labels" "$root/etc/shirudo/node.labels"+ sed "s/@reference@/${name#config-tree-}/g" \+ "$templates/upatch-tree.conf.in" \+ >"$root/etc/shirudo/bpm/upatch-tree.conf";;config-otel)- cat >"$root/etc/shirudo/shirudo.conf" <<'EOF'-eventlog.max_bytes = 0-map_export.tenant_id = tenant-config-0000-map_export.otel_endpoint = http://127.0.0.1:5444-map_export.otel_insecure = true-map_export.otel_retries = 0-EOF+ cp "$templates/otel.conf" "$root/etc/shirudo/shirudo.conf";;esaccp "$output/public/boot.der" "$root/keys/trusted/$boot_fp.der"diff --git a/contrib/verity-vm-install.sh b/contrib/verity-vm-install.shindex 045ad9a7..c65d4112 100755--- a/contrib/verity-vm-install.sh+++ b/contrib/verity-vm-install.sh@@ -5,6 +5,7 @@set -euo pipefailsource_dir=$(cd "$(dirname "$0")/.." && pwd)+templates="$source_dir/contrib/verity-vm"state=${SHIRUDO_VERITY_VM_STATE:-$HOME/.linux-kernel-vscode/shirudo-verity}kernel=keys_dir=@@ -29,7 +30,7 @@ release=$(cat "$kernel/include/config/kernel.release")for name in config-a config-b config-bad; domkdir -p "$work/$name/etc/shirudo" "$work/$name/keys/trusted" "$work/$name/keys/revoked"- printf 'eventlog.max_bytes = 0\nmap_export.tenant_id = %s\n' "$name" \+ sed "s/@tenant@/$name/g" "$templates/config.conf.in" \>"$work/$name/etc/shirudo/shirudo.conf"if [ "$name" = config-bad ]; thenprintf 'invalid certificate\n' >"$work/$name/keys/revoked/0000000000000000000000000000000000000000000000000000000000000000.der"@@ -38,12 +39,8 @@ for name in config-a config-b config-bad; do--output "$work/$name" --keys-dir "$keys_dir" --size 8 \--builder "$source_dir/tools/shirudo-build/shirudo-build"done-cat >"$work/runtime.conf" <<'EOF'-config.image = /var/lib/shirudo/images/config-a-config.verification_key = /run/shirudo/runtime/etc/shirudo/config-cert.der-config.pcr = 14-tpm.tcti = device:/dev/tpmrm0-EOF+sed 's/@config_image@/config-a/g' "$templates/runtime.conf.in" \+ >"$work/runtime.conf"extra=()for probe in "${probes[@]}"; doextra+=(--extra-binary "$probe")@@ -55,9 +52,11 @@ done--unit-output "$work/runtime-service.conf" "${extra[@]}" >"$work/runtime-root"runtime_command=$(sed -n 's/^ExecStart=\(.*\) init$/\1/p' "$work/runtime-service.conf")[ -n "$runtime_command" ]-printf '#!/bin/sh\nexec %s "$@"\n' "$runtime_command" >"$work/shirudo-runtime"-printf 'runtime.image = /var/lib/shirudo/images/runtime\nruntime.root_hash = %s\n' \- "$(cat "$work/runtime-root")" >"$work/bootstrap.conf"+command_escaped=$(printf '%s' "$runtime_command" | sed 's/[\&|]/\\&/g')+sed "s|@runtime_command@|$command_escaped|g" "$templates/shirudo-runtime.in" \+ >"$work/shirudo-runtime"+sed "s/@root_hash@/$(cat "$work/runtime-root")/g" \+ "$templates/bootstrap.conf.in" >"$work/bootstrap.conf"make -C "$kernel" -j"$(nproc)" LLVM=1 INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH="$work/modules" modules_install@@ -79,32 +78,14 @@ donesed 's|@bindir@|/usr/local/bin|g' "$source_dir/systemd/shirudo-initrd.service.in" >"$work/shirudo-initrd.service""$vm" push "$work/shirudo-initrd.service" /usr/lib/systemd/system/shirudo-initrd.service-"$vm" ssh bash -s -- "$release" <<'GUEST'-set -euo pipefail-chmod 0755 /usr/local/bin/shirudo /usr/local/bin/shirudo-runtime /usr/local/bin/shirudo-gen-initrd /usr/lib/dracut/modules.d/90shirudo/module-setup.sh-mkdir -p /root/prototype-backup-if [ -d /var/lib/shirudo/upatches ] && [ ! -e /root/prototype-backup/upatches ]; then- mv /var/lib/shirudo/upatches /root/prototype-backup/upatches-fi-mkdir -p /var/lib/shirudo/upatches-printf 'console=ttyS0,115200 root=/dev/vda rw nokaslr lsm=bpf bpf.keyring_unsealed=1 dm_verity.keyring_unsealed=1\n' >/etc/kernel/cmdline-/usr/local/bin/shirudo-gen-initrd --kver "$1" --output /boot/initrd-shirudo-verity.img \- --binary /usr/local/bin/shirudo --binary-path /usr/local/bin/shirudo \- --cert /var/lib/shirudo/keys/cert.der --bootstrap-conf /etc/shirudo/shirudo.conf \- --unit /usr/lib/systemd/system/shirudo-initrd.service \- -- --no-hostonly --no-hostonly-cmdline --add-drivers 'efivarfs dm_mod dm_verity loop ext4' \- --modules 'base systemd systemd-initrd dracut-systemd rootfs-block fs-lib udev-rules terminfo shirudo' \- >/root/test-results/verity/initrd-build.log 2>&1-ukify build --linux /boot/vmlinuz-shirudo-verity --initrd /boot/initrd-shirudo-verity.img \- --cmdline @/etc/kernel/cmdline --os-release @/etc/os-release \- --output /boot/shirudo-verity.efi >/root/test-results/verity/uki-build.log 2>&1-GUEST+"$vm" push "$templates/kernel.cmdline" /etc/kernel/cmdline+"$vm" ssh bash -s -- "$release" <"$templates/install-guest.sh""$vm" pull /boot/shirudo-verity.efi "$state/shirudo-verity.efi""$vm" pull /boot/initrd-shirudo-verity.img "$state/initrd-verity.img"image_file=$(mktemp "$state/esp.img.XXXXXX")trap 'rm -f "$image_file"' EXITtruncate -s 256M "$image_file"-printf 'label: gpt\nstart=2048, type=U\n' | sfdisk "$image_file" >/dev/null+sfdisk "$image_file" <"$templates/esp.sfdisk" >/dev/nullmformat -i "$image_file@@1048576" -F -v SHIRUDOV ::mmd -i "$image_file@@1048576" ::/EFI ::/EFI/BOOTmcopy -i "$image_file@@1048576" "$state/shirudo-verity.efi" ::/EFI/BOOT/BOOTX64.EFIdiff --git a/contrib/verity-vm/README.md b/contrib/verity-vm/README.mdnew file mode 100644index 00000000..a25b5423--- /dev/null+++ b/contrib/verity-vm/README.md@@ -0,0 +1,10 @@+# VM image fixtures++The configs, service units and guest scripts used by the image tests live+here. The calling scripts copy these files and substitute the values named+between `@` characters in `.in` templates.++`seed-root.sh` installs the ordinary boot files in the initrd. Image mode+also runs `seed-images.sh`. `install-guest.sh` finishes the manual VM setup.+The runtime service template used by the operator is kept separately in+`tools/gen-image/runtime-service.conf.in`.diff --git a/contrib/verity-vm/bootstrap.conf.in b/contrib/verity-vm/bootstrap.conf.innew file mode 100644index 00000000..384322e2--- /dev/null+++ b/contrib/verity-vm/bootstrap.conf.in@@ -0,0 +1,4 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+runtime.image = /var/lib/shirudo/images/runtime+runtime.root_hash = @root_hash@diff --git a/contrib/verity-vm/config.conf.in b/contrib/verity-vm/config.conf.innew file mode 100644index 00000000..f3da7544--- /dev/null+++ b/contrib/verity-vm/config.conf.in@@ -0,0 +1,4 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+eventlog.max_bytes = 0+map_export.tenant_id = @tenant@diff --git a/contrib/verity-vm/esp.sfdisk b/contrib/verity-vm/esp.sfdisknew file mode 100644index 00000000..101f8580--- /dev/null+++ b/contrib/verity-vm/esp.sfdisk@@ -0,0 +1,2 @@+label: gpt+start=2048, type=Udiff --git a/contrib/verity-vm/install-guest.sh b/contrib/verity-vm/install-guest.shnew file mode 100644index 00000000..fb03027e--- /dev/null+++ b/contrib/verity-vm/install-guest.sh@@ -0,0 +1,23 @@+#!/bin/bash+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo++set -euo pipefail+chmod 0755 /usr/local/bin/shirudo /usr/local/bin/shirudo-runtime \+ /usr/local/bin/shirudo-gen-initrd \+ /usr/lib/dracut/modules.d/90shirudo/module-setup.sh+mkdir -p /root/prototype-backup+if [ -d /var/lib/shirudo/upatches ] && [ ! -e /root/prototype-backup/upatches ]; then+ mv /var/lib/shirudo/upatches /root/prototype-backup/upatches+fi+mkdir -p /var/lib/shirudo/upatches+/usr/local/bin/shirudo-gen-initrd --kver "$1" --output /boot/initrd-shirudo-verity.img \+ --binary /usr/local/bin/shirudo --binary-path /usr/local/bin/shirudo \+ --cert /var/lib/shirudo/keys/cert.der --bootstrap-conf /etc/shirudo/shirudo.conf \+ --unit /usr/lib/systemd/system/shirudo-initrd.service \+ -- --no-hostonly --no-hostonly-cmdline --add-drivers 'efivarfs dm_mod dm_verity loop ext4' \+ --modules 'base systemd systemd-initrd dracut-systemd rootfs-block fs-lib udev-rules terminfo shirudo' \+ >/root/test-results/verity/initrd-build.log 2>&1+ukify build --linux /boot/vmlinuz-shirudo-verity --initrd /boot/initrd-shirudo-verity.img \+ --cmdline @/etc/kernel/cmdline --os-release @/etc/os-release \+ --output /boot/shirudo-verity.efi >/root/test-results/verity/uki-build.log 2>&1diff --git a/contrib/verity-vm/kernel.cmdline b/contrib/verity-vm/kernel.cmdlinenew file mode 100644index 00000000..ea9fb2ba--- /dev/null+++ b/contrib/verity-vm/kernel.cmdline@@ -0,0 +1 @@+console=ttyS0,115200 root=/dev/vda rw nokaslr lsm=bpf bpf.keyring_unsealed=1 dm_verity.keyring_unsealed=1diff --git a/contrib/verity-vm/node.labels b/contrib/verity-vm/node.labelsnew file mode 100644index 00000000..c1b7f5f6--- /dev/null+++ b/contrib/verity-vm/node.labels@@ -0,0 +1 @@+env=tree-testdiff --git a/contrib/verity-vm/otel.conf b/contrib/verity-vm/otel.confnew file mode 100644index 00000000..90ee8338--- /dev/null+++ b/contrib/verity-vm/otel.conf@@ -0,0 +1,7 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+eventlog.max_bytes = 0+map_export.tenant_id = tenant-config-0000+map_export.otel_endpoint = http://127.0.0.1:5444+map_export.otel_insecure = true+map_export.otel_retries = 0diff --git a/contrib/verity-vm/runtime.conf.in b/contrib/verity-vm/runtime.conf.innew file mode 100644index 00000000..69d8a3a6--- /dev/null+++ b/contrib/verity-vm/runtime.conf.in@@ -0,0 +1,6 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+config.image = /var/lib/shirudo/images/@config_image@+config.verification_key = /run/shirudo/runtime/etc/shirudo/config-cert.der+config.pcr = 14+tpm.tcti = device:/dev/tpmrm0diff --git a/contrib/verity-vm/seed-images.sh b/contrib/verity-vm/seed-images.shnew file mode 100644index 00000000..34561ab7--- /dev/null+++ b/contrib/verity-vm/seed-images.sh@@ -0,0 +1,10 @@+#!/bin/sh+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo++set -eu+mkdir -p /sysroot/var/lib/shirudo/images /sysroot/etc/shirudo+cp /shirudo-test-images/*.img /shirudo-test-images/*.verity \+ /shirudo-test-images/*.roothash /shirudo-test-images/*.p7s \+ /sysroot/var/lib/shirudo/images/+cp /shirudo-test-images/bootstrap.conf /sysroot/etc/shirudo/shirudo.confdiff --git a/contrib/verity-vm/seed-root.sh b/contrib/verity-vm/seed-root.shnew file mode 100644index 00000000..f4ae658c--- /dev/null+++ b/contrib/verity-vm/seed-root.sh@@ -0,0 +1,12 @@+#!/bin/sh+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo++set -eu+mkdir -p /sysroot/usr/local/bin /sysroot/var/lib/shirudo/keys/trusted+cp /usr/local/bin/shirudo /sysroot/usr/local/bin/shirudo+chmod 0755 /sysroot/usr/local/bin/shirudo+cp /etc/shirudo/keys/cert.der /sysroot/var/lib/shirudo/keys/cert.der+cp /etc/shirudo/keys/trusted/* /sysroot/var/lib/shirudo/keys/trusted/+chmod 0700 /sysroot/var/lib/shirudo /sysroot/var/lib/shirudo/keys \+ /sysroot/var/lib/shirudo/keys/trusteddiff --git a/contrib/verity-vm/shirudo-runtime.in b/contrib/verity-vm/shirudo-runtime.innew file mode 100644index 00000000..17557f63--- /dev/null+++ b/contrib/verity-vm/shirudo-runtime.in@@ -0,0 +1,4 @@+#!/bin/sh+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+exec @runtime_command@ "$@"diff --git a/contrib/verity-vm/shirudo-test-seed-images.conf b/contrib/verity-vm/shirudo-test-seed-images.confnew file mode 100644index 00000000..2b5e435d--- /dev/null+++ b/contrib/verity-vm/shirudo-test-seed-images.conf@@ -0,0 +1,3 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+ExecStart=/bin/sh /shirudo-test-seed-images.shdiff --git a/contrib/verity-vm/shirudo-test-seed.service b/contrib/verity-vm/shirudo-test-seed.servicenew file mode 100644index 00000000..8b795f6d--- /dev/null+++ b/contrib/verity-vm/shirudo-test-seed.service@@ -0,0 +1,12 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+[Unit]+Description=shirudo test VM: seed the root file system with the bundle+DefaultDependencies=no+After=initrd-root-fs.target+Before=shirudo-initrd.service+RequiresMountsFor=/sysroot++[Service]+Type=oneshot+ExecStart=/bin/sh /shirudo-test-seed-root.shdiff --git a/contrib/verity-vm/upatch-tree.conf.in b/contrib/verity-vm/upatch-tree.conf.innew file mode 100644index 00000000..0ada72b1--- /dev/null+++ b/contrib/verity-vm/upatch-tree.conf.in@@ -0,0 +1,4 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+endpoint = oci://127.0.0.1:5443/shirudo/upatch-tree+reference = @reference@diff --git a/testing/Makefile b/testing/Makefileindex c0bf7376..f0d9eb1d 100644--- a/testing/Makefile+++ b/testing/Makefile@@ -118,9 +118,11 @@ TEST_VM_BUNDLE_SOURCES := $(sort $(wildcard \$(ROOT)/vendor/libbpf/include/asm/*.h \$(ROOT)/testing/helper/*.c $(ROOT)/testing/helper/*.h $(ROOT)/testing/helper/*.py \$(ROOT)/testing/tamperproof/*.c $(ROOT)/contrib/verity-*.sh \- $(ROOT)/tools/gen-image/shirudo-gen-* \+ $(ROOT)/tools/gen-image/shirudo-gen-* $(ROOT)/tools/gen-image/*.in \+ $(ROOT)/contrib/verity-vm/* \$(ROOT)/testing/upatch/kernel-obs/exec/*.c $(ROOT)/completion/* $(ROOT)/systemd/*.in \$(ROOT)/systemd/*.timer $(ROOT)/testing/fixtures/*.c $(ROOT)/testing/fixtures/*.lua \+ $(ROOT)/testing/fixtures/*.conf \$(ROOT)/testing/fixtures/decoders/* \$(ROOT)/upatches/kernel-obs/*.c $(ROOT)/upatches/kernel-obs/*.h $(ROOT)/upatches/kernel-obs/*.list \$(ROOT)/upatches/kernel-obs/*.py $(ROOT)/upatches/kernel-obs/Beefile \diff --git a/testing/fixtures/image-runtime.conf b/testing/fixtures/image-runtime.confnew file mode 100644index 00000000..a15b20c2--- /dev/null+++ b/testing/fixtures/image-runtime.conf@@ -0,0 +1,5 @@+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+config.verification_key = /run/shirudo/runtime/etc/shirudo/config-cert.der+config.pcr = 14+config.image = /var/lib/shirudo/images/configdiff --git a/testing/fixtures/image-static-probe.c b/testing/fixtures/image-static-probe.cnew file mode 100644index 00000000..cfe0eac3--- /dev/null+++ b/testing/fixtures/image-static-probe.c@@ -0,0 +1,7 @@+// SPDX-License-Identifier: BSD-2-Clause+/* Copyright (c) 2026 Authors of shirudo */++int main(void)+{+ return 0;+}diff --git a/testing/t0045-config-image.sh b/testing/t0045-config-image.shindex 9dd4074d..f4c6ad52 100755--- a/testing/t0045-config-image.sh+++ b/testing/t0045-config-image.sh@@ -238,9 +238,8 @@ if command -v mkfs.ext4 >/dev/null 2>&1 && command -v debugfs >/dev/null 2>&1; t'test_expect_success 'runtime generator includes interpreter, public keys and trusted probe' '- printf "config.verification_key = /run/shirudo/runtime/etc/shirudo/config-cert.der\nconfig.pcr = 14\nconfig.image = /var/lib/shirudo/images/config\n" >"$W/bootstrap.conf" &&- printf "int main(void) { return 0; }\n" >"$W/static-probe.c" &&- ${CC:-cc} -static "$W/static-probe.c" -o "$W/static-probe" &&+ cp fixtures/image-runtime.conf "$W/bootstrap.conf" &&+ ${CC:-cc} -static fixtures/image-static-probe.c -o "$W/static-probe" &&../tools/gen-image/shirudo-gen-runtime --binary "$S" \--bootstrap-conf "$W/bootstrap.conf" --cert "$W/keys/cert.der" \--config-cert "$W/other/cert.der" --keys-dir "$W/keys" --builder "$B" \