ci: QEMU 自动引导 + 一键复现;docs: 测试计数修正(148→实测)与 host 测试命令 - #13
Merged
Conversation
独立代码审查(b216a4d)发现项一次性修补: - read_blocking 补调用契约文档:仅任务上下文(xworker.current() + Task::block(),boot/ISR 调用即踩空指针)+ 单读者契约(EventDevice 单等待者覆盖语义,并发调用互相覆盖 waiter,先登记者永久丢唤醒)—— 旧 read_byte 方法文档上的两条红线在迁移时只留在了 trait 侧 - Control trait 文档承认占位实现:能力已暴露但命令面未定义时(如 Uart0) 可对一切 op 报 Unsupported,消除与"未知 op 报 InvalidInput"的字面张力 (DeviceError::Unsupported 的枚举文档本就覆盖"未实现的 op") - ble/at.rs 与 ble_gatt.rs 红线注释改写:旧机制(阻塞 read_byte → xworker 空指针)已随重构移入 read_blocking;BleIo::read_byte 现为 非阻塞读,send 空缓冲只走 yield_now+字节预算——boot 下的风险从 UB 降级为预算耗尽超时,纪律不变(boot 只用 poll());同时消除与 send 内联注释"任何上下文安全"的自相矛盾 - device::table 补 find_block/find_bus 回归测试(MockBlock/MockBus, 计数透传+能力不符 None),清单侧五能力查找覆盖 5/5,对齐设计稿 §10 "防 as_* 漏 override 静默 None"纪律 - 设计稿头部同步:关联模块改列 device.rs/device/table.rs,状态标已实施 验证:host 回归 158/158(+find_block_and_bus_roundtrip); rustfmt --check 仅作用叶子文件 table.rs 零偏差(不全量 fmt,避免基线漂移); driver 示例链接构建通过 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
审查 PR #13 发现: - F1(高): get-qemu.sh 的 mv 用带平台后缀的 $NAME 匹配解压根目录,但 xPack 三平台包统一解压到 xpack-qemu-riscv-<ver>(无后缀),[ -d ] 恒为假 → mv 跳过 → 通道 A(零安装)在 win32/linux/darwin 全部失败。CI 因 apt 预装 QEMU、本机走系统 QEMU,引导分支零覆盖,故一路绿。改:新增 SHORT=xpack-qemu-riscv-<ver> 作 mv/清理基准;unzip -q→-qo 并解压前清 残留,避免重跑交互式覆盖询问。已本机实跑验证:下载→解压→落 .tools/qemu →跑通 9.2.4,二次运行幂等早退。 - F2(低): README 门禁计数 157→158(rebase 带上 769cff4 的新增测试 find_block_and_bus_roundtrip),并注明计数随新增测试浮动、以 gate.sh 实测为准。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gqf2008
force-pushed
the
ci/qemu-zero-install
branch
from
September 3, 2026 01:32
e123559 to
3afb1f6
Compare
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.
动机
cargo test --lib在干净环境直接报 E0463(.cargo/config.toml 默认 thumbv7em target) #12: README 的cargo test --lib在干净机器直接 E0463(.cargo/config.toml默认 thumbv7em)实测结论(issue #11 的答案)
cargo test --lib(默认 features): 80 passed--no-default-features --features xtask_executor,xtask_scheduler,timer,fs,net,usb,ble,即ci/gate.sh第 1 步): 157 passed(= 源码中 157 处#[test])改动
ci/get-qemu.sh(新).tools/(免管理员;Windows/macOS/Linux)ci/gate.sh.devcontainer.json(新)README.md--target.gitignore.tools/Closes #12, refs #11