1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00
Files
bootc/tmt
Colin Walters e0475cd60e initramfs: Mount /sysroot readonly for composefs by default
This implements readonly mounting of /sysroot for composefs systems,
matching the behavior that ostree systems already have. Previously,
composefs left /sysroot mounted read-write, which was inconsistent
and meant the readonly tests had to be skipped for composefs.

The implementation uses a direct `libc::syscall` wrapper for
`mount_setattr` since rustix doesn't yet provide this API. The
`MOUNT_ATTR_RDONLY` flag is applied to three mount
points during initramfs setup:
- The composefs rootfs image mount (becomes `/` after switch-root)
- The test root filesystem mount (used in testing scenarios)
- The sysroot clone mount (becomes `/sysroot` in the booted system)

With this change, the readonly /sysroot tests in test-status.nu
now run for both ostree and composefs systems without conditional
checks.

Assisted-by: Claude Code (Sonnet 4.5)
Co-authored-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-18 23:51:36 -05:00
..

Run integration test locally

In the bootc CI, integration tests are executed via Packit on the Testing Farm. In addition, the integration tests can also be run locally on a developer's machine, which is especially valuable for debugging purposes.

To run integration tests locally, you need to install tmt and provision-virtual plugin in this case. Be ready with dnf install -y tmt+provision-virtual. Then, use tmt run -vvvvv plans -n integration command to run the all integration tests.

To run integration tests on different distros, just change image: fedora-rawhide in 9d15eedea0/tmt/plans/integration.fmf (L6).

The available images value can be found from https://tmt.readthedocs.io/en/stable/plugins/provision.html#images.

Enjoy integration test local running!