File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,3 +114,19 @@ jobs:
114114 run : |
115115 set -xeuo pipefail
116116 sudo podman run --rm -v $PWD:/run/src -w /run/src --privileged localhost/bootupd:latest tests/tests/generate-update-metadata.sh
117+
118+ # Verify bootupd works in a bcvk ephemeral (virtiofs) environment.
119+ # This catches regressions where bootloader-update.service fails on
120+ # systems without a disk-backed bootloader (direct kernel boot).
121+ ephemeral :
122+ runs-on : ubuntu-24.04
123+ steps :
124+ - uses : actions/checkout@v6
125+ - uses : bootc-dev/actions/bootc-ubuntu-setup@main
126+ with :
127+ libvirt : true
128+ - name : Build container image
129+ run : sudo podman build --build-arg=base=quay.io/fedora/fedora-bootc:43 -t localhost/bootupd:latest -f Dockerfile .
130+ - name : Smoke test (bcvk ephemeral)
131+ timeout-minutes : 10
132+ run : bcvk ephemeral run-ssh localhost/bootupd:latest -- /usr/libexec/bootupd-tests/ephemeral-test.sh
Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ COPY --from=build /out/ /
2626# Remove /var/roothome as workaround
2727RUN <<EORUN
2828set -xeuo pipefail
29- [ -d /var/roothome ] && rm -rf /var/roothome
29+ rm -rf /var/roothome
3030EORUN
31- # Sanity check this too
32- RUN bootc container lint --fatal-warnings
31+ # Install CI test scripts (used by bcvk ephemeral smoke tests)
32+ COPY --from=build /build/ci/ephemeral-test.sh /usr/libexec/bootupd-tests/ephemeral-test.sh
33+ # Sanity check this too; don't use --fatal-warnings as some base images
34+ # have pre-existing warnings (e.g. /run/systemd content in Fedora).
35+ RUN bootc container lint
3336
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Smoke test for bcvk ephemeral (virtiofs direct-boot) environments.
3+ # This runs *inside* the ephemeral VM and verifies that bootupd
4+ # handles the diskless virtiofs root gracefully.
5+ set -xeuo pipefail
6+
7+ # Verify we're actually on virtiofs — this test is meaningless otherwise.
8+ root_fstype=$( findmnt -n -o FSTYPE /)
9+ if [ " $root_fstype " != " virtiofs" ]; then
10+ echo " ERROR: expected root fstype 'virtiofs', got '${root_fstype} '" >&2
11+ exit 1
12+ fi
13+ echo " ok: root filesystem is virtiofs"
14+
15+ # The bootloader-update.service should have already run at boot (it's
16+ # enabled by preset on Fedora). Verify it succeeded rather than failed.
17+ systemctl is-active bootloader-update.service
18+ echo " ok: bootloader-update.service is active (ran successfully at boot)"
19+
20+ # Also verify a manual invocation skips cleanly.
21+ output=$( bootupctl update 2>&1 )
22+ echo " $output "
23+ if ! echo " $output " | grep -qi ' skipping' ; then
24+ echo " ERROR: expected skip message in output" >&2
25+ exit 1
26+ fi
27+ echo " ok: bootupctl update skipped cleanly on virtiofs"
28+
29+ echo " All ephemeral smoke tests passed."
You can’t perform that action at this time.
0 commit comments