-
Notifications
You must be signed in to change notification settings - Fork 53
feat: QEMU 测试环境增强 - 统一 setup 脚本和 CI 改进 #363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yoinspiration
wants to merge
13
commits into
arceos-hypervisor:master
Choose a base branch
from
yoinspiration:dev/qemu-test-enhancement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: QEMU 测试环境增强 - 统一 setup 脚本和 CI 改进 #363
yoinspiration
wants to merge
13
commits into
arceos-hypervisor:master
from
yoinspiration:dev/qemu-test-enhancement
Conversation
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
ZR233
requested changes
Feb 6, 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 依赖和 phytium-blk feature - 恢复 phytiumpi 板级配置中的 driver/phytium-blk - 上游仓库 https://github.com/YanQD/phytium-mci 已恢复可用 Co-authored-by: Cursor <cursoragent@cursor.com>
20756b2 to
37ae893
Compare
ZR233
requested changes
Feb 9, 2026
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>
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 配置以更好地检测测试失败。
主要改动
1. 统一 QEMU 测试环境准备脚本
新增
scripts/setup_qemu.sh:统一的入口脚本,支持所有 Guest 系统arceos、linux、nimbos三种 Guest重构现有脚本:
setup_qemu_arceos.sh、setup_qemu_linux.sh、setup_qemu_nimbos.sh改为调用统一脚本的包装,减少代码重复2. NimbOS x86_64 支持与配置统一
对齐镜像下载与 VM 配置:
cargo xtask image download qemu_x86_64_nimbos下载并解压镜像到/tmp/.axvisor-images/qemu_x86_64_nimbosconfigs/vms/nimbos-x86_64-qemu-smp1.toml中的kernel_path统一指向上述目录下的qemu-x86_64image_location = "memory":直接从宿主机镜像目录将 kernel 加载到内存中简化 NimbOS rootfs 处理逻辑:
mount/guestmount等特权操作)tmp/rootfs.img,避免对 CI 环境额外要求3. CI 配置改进
qemu-aarch64.toml中添加"panicked at"作为失败模式uboot.toml保持一致支持的测试组合
Hello, world!test pass!usertests passed!使用方式
快速开始
执行测试
脚本会自动输出对应的
cargo xtask qemu命令,例如:技术细节
统一脚本设计
NimbOS 特殊处理
image_location = "memory",直接从宿主机镜像目录加载 kernel,避免对 guest rootfs 做写入或挂载操作。setup_qemu.sh nimbos流程,准备好 kernel 与 rootfs 后,使用qemu-x86_64-kvm.toml在具备 VT-x/KVM 的环境中运行。测试
EXT4-fs error导致No working init found,怀疑是实验环境 SD 卡 / rootfs 镜像损坏,与本 PR 改动无直接关系fail_regex检测检查清单