ci(qemu): 统一 setup 流程并提升测试稳定性#363
Open
yoinspiration wants to merge 17 commits intoarceos-hypervisor:masterfrom
Open
ci(qemu): 统一 setup 流程并提升测试稳定性#363yoinspiration wants to merge 17 commits intoarceos-hypervisor:masterfrom
yoinspiration wants to merge 17 commits intoarceos-hypervisor:masterfrom
Conversation
ZR233
requested changes
Feb 6, 2026
20756b2 to
37ae893
Compare
ZR233
requested changes
Feb 9, 2026
- switch x86_64 qemu to TCG with generic cpu - adjust linux and nimbos VM kernel image paths for qemu tests - refresh Cargo.lock after dependency updates
- 上游 https://github.com/YanQD/phytium-mci 仓库已删除 (Repository not found) - 注释 modules/driver 中的 phytium-blk 功能及 phytium-mci 依赖 - 更新 configs/board/phytiumpi.toml 禁用 phytium-blk - 从 Cargo.lock 移除 phytium-mci - 添加 .cargo/config.toml 中 git-fetch-with-cli 配置 Phytium Pi 板卡构建暂不可用,QEMU aarch64 等场景可正常使用 Co-authored-by: Cursor <cursoragent@cursor.com>
- Add setup_qemu_linux.sh: prepare Linux guest for aarch64 QEMU test - Add setup_qemu_nimbos.sh: prepare NimbOS guest for x86_64 QEMU test - Inject kernel into rootfs for image_location=fs mode - Support mount/guestmount for rootfs modification - Add qemu-x86_64-kvm.toml: KVM config for VT-x capable hosts - Use -accel kvm -cpu host for hardware virtualization Co-authored-by: Cursor <cursoragent@cursor.com>
- 新增 setup_qemu.sh 统一入口,支持 --guest arceos|linux|nimbos - 原 setup_qemu_*.sh 改为调用统一脚本的包装 - 简化多 Guest 环境准备流程 Co-authored-by: Cursor <cursoragent@cursor.com>
Align with uboot.toml, detect 'panicked at' as failure pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
- 恢复 modules/driver 中 phytium-mci 依赖(使用 crates.io v0.1.1) - 恢复 phytiumpi 板级配置中的 driver/phytium-blk - 原 git 仓库已不可用,改为 crates.io 发布版本 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- point nimbos kernel_path to xtask image extract directory - simplify setup_qemu.sh to stop injecting kernel into rootfs - make nimbos config and setup script consistent with image_location=memory Co-authored-by: Cursor <cursoragent@cursor.com>
NimbOS x86_64 requires axvm-bios at 0x8000 to bootstrap the guest. Revert the incorrect removal in ab5d1d8 that assumed QEMU's default BIOS would run inside the nested guest (it does not). - Restore bios_path and bios_load_addr in nimbos-x86_64-qemu-smp1.toml - Add axvm-bios.bin download in setup_qemu.sh for nimbos - Add axvm-bios download in CI test-qemu workflow for x86_64 nimbos Co-authored-by: Cursor <cursoragent@cursor.com>
- Add scripts/ci_run_qemu_nimbos.py to automatically send 'usertests' command when 'Rust user shell' appears, so CI doesn't hang waiting for input - Update test-qemu.yml to use the wrapper script only for NimbOS tests - Other guests (ArceOS, Linux) continue to run directly without wrapper Co-authored-by: Cursor <cursoragent@cursor.com>
3c598ee to
9b83866
Compare
Replace subprocess.PIPE with pty so the child sees a real TTY. With PIPE the child may treat stdin as non-interactive and not forward input to QEMU, causing CI to hang waiting for 'usertests' input. Also add fallback trigger '>>' in addition to 'Rust user shell'. Co-authored-by: Cursor <cursoragent@cursor.com>
setup_qemu.sh already supports direct guest argument, making the per-guest wrappers unnecessary. Co-authored-by: Cursor <cursoragent@cursor.com>
Add bilingual documentation covering environment setup, Rust toolchain installation, KVM configuration, and running guest OSes on QEMU. Co-authored-by: Cursor <cursoragent@cursor.com>
Return zero when `usertests passed!` is detected so CI doesn't fail when QEMU is intentionally terminated after success pattern matching. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
CI 在 cargo xtask image download qemu_aarch64_linux 步骤访问 |
ZR233
requested changes
Feb 26, 2026
| fi | ||
|
|
||
| # NimbOS x86_64 requires axvm-bios for bootstrapping | ||
| if [[ "$GUEST" == "nimbos" ]]; then |
Contributor
There was a problem hiding this comment.
xtask download 已下载 nimbos axvm-bios.bin,此处重复操作?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 增强了 AxVisor 的 QEMU 测试流程,统一环境准备入口,并提升 CI 对 NimbOS 场景的稳定性与失败可观测性。
主要改动
1) 统一 QEMU 环境准备入口
scripts/setup_qemu.sh,统一支持arceos/linux/nimbos2) NimbOS x86_64 配置与流程对齐
configs/vms/nimbos-x86_64-qemu-smp1.toml对齐镜像下载目录image_location = "memory",从宿主机镜像目录加载 kernelaxvm-bios.bin以满足 NimbOS 引导要求3) CI 失败检测增强
qemu-aarch64.toml增加fail_regex(如panicked at),更早暴露 guest panic4) NimbOS CI 自动输入与退出码修复
scripts/ci_run_qemu_nimbos.py使用 PTY 启动子进程,确保输入可正确传递usertestsusertests passed!后返回 0,避免“成功后主动终止 QEMU”导致 CI 误报失败支持的测试组合
Hello, world!test pass!usertests passed!测试结果
setup_qemu.sh在 ArceOS / Linux / NimbOS 三类 Guest 的环境准备流程可执行Out of Scope / Known Issues
EXT4-fs error/No working init found,更偏向实验环境 SD 卡 / rootfs 镜像问题;当前未在本 PR 改动路径中复现,后续单独跟进。检查清单