1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 06:45:13 +01:00
Files
bootc/tmt/bug-soft-reboot.md
Colin Walters c832f6d0fc tmt: Document soft-reboot limitation and fix tests
TMT does not support systemd soft-reboots - it only detects reboots
by checking if /proc/stat btime changes, which doesn't happen during
soft-reboots. This caused test-custom-selinux-policy to hang when
running with bcvk (which allows actual soft-reboots), while it
accidentally passed with testcloud (which forced full VM reboots).

Add bug-soft-reboot.md documenting this limitation and update both
test files to reference it. Also remove --soft-reboot=auto from
test-custom-selinux-policy since we can't test it with TMT anyway.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-06 19:32:42 -05:00

1.4 KiB

TMT soft-reboot limitation

TMT does not currently support systemd soft-reboots. It detects reboots by checking if the /proc/stat btime (boot time) field changes, which does not happen during a systemd soft-reboot.

See: https://github.com/teemtee/tmt/issues/3143

Note: This same issue affects Testing Farm as documented in plans/integration.fmf where test-27-custom-selinux-policy is disabled for Packit (AWS) testing.

Impact on bootc testing

This means that when testing bootc switch --soft-reboot=auto or bootc upgrade --soft-reboot=auto:

  1. The bootc commands will correctly prepare for a soft-reboot (staging the deployment in /run/nextroot)
  2. However, TMT cannot detect or properly handle the soft-reboot
  3. Tests must explicitly reset the soft-reboot preparation before calling tmt-reboot

Workaround

After calling bootc with --soft-reboot=auto, use:

ostree admin prepare-soft-reboot --reset
tmt-reboot

This forces a full reboot instead of a soft-reboot, which TMT can properly detect.

Testing environments

  • testcloud: Accidentally worked because libvirt forced a full VM power cycle, overriding systemd's soft-reboot attempt
  • bcvk: Exposes the real issue because it allows actual systemd soft-reboots
  • Production (AWS, bare metal, etc.): Not affected - TMT is purely a testing framework; soft-reboots work correctly in production