Skip to content

Commit d0b8797

Browse files
committed
test/system: Add non-native architecture tests for create and run commands
Add system tests for the cross-architecture extensions to the 'create' and 'run' (including the entry point init-container) commands introduced in PRs containers#1787, containers#1788, and containers#1789. The 3xx numbering range mirrors the 1xx range for native command tests, with 301 corresponding to 101 (create) and 304 to 104 (run). 301-create.bats (28 tests) covers: - Basic cross-arch container creation with --arch - Interaction with --distro/--release, --image, and --container flags - binfmt architecture name aliases (e.g., aarch64 resolves to arm64) - Host architecture passed to --arch is treated as native - Architecture-suffixed image tags (inference and conflict detection) - Native and cross-arch container coexistence - Entry point arguments (--arch, --arch-emulator-path) - Error paths: unsupported architecture, case sensitivity, conflicting --arch and image tag, duplicate container, missing QEMU, fake QEMU (shell script instead of ELF), missing skopeo 304-run.bats (23 tests) covers: - Smoke tests with true(1) and uname(1) architecture verification - /run/.toolboxenv existence, --container targeting, container reuse - binfmt_misc mount and QEMU registration inside the container - Exit code propagation (false, exit 2) - Entry point error and delay handling - Stop and restart re-initialization - sudo inside cross-arch container - Native and cross-arch container coexistence without interference - QEMU emulator fallback paths (missing recorded path, /usr/bin fallback) All tests use the 'non-native' Bats file tag for selective execution. containers#1794 Signed-off-by: Dalibor Kricka <dalidalk@seznam.cz>
1 parent c0de2ec commit d0b8797

2 files changed

Lines changed: 1447 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)