F3.8: tests host (scheduler/MPU/ABI) + integración en CI#77
Merged
Conversation
Crate `rugus-host-tests` (excluido del workspace embebido, std, triple nativo) que prueba la lógica arch-agnóstica de rugus-core con un `Arch` simulado (MockArch): 17 tests sobre scheduler (round-robin por banda, preempción por slice, sleep/wake, kill/respawn-guard), sandbox MPU (región userland vs privilegiada, stacks alineados pow2), ABI de syscalls (versión, Id::from_raw, validate_user_range/dispatch) y faults (FaultKind/FaultReport/Domain). - rugus-core: feature `test-util` (OFF por defecto, no se filtra a los binarios del kernel) con semillas de prueba del scheduler; `pub mod user` de syscall gateado a `target_arch = "arm"` (los trampolines SVC usan r0..r3, no compilan en host x86). - CI: el job `host` ahora corre fmt-check + clippy + test del nuevo crate junto a rugus-proto/rugus-cli. - Canonicalización rustfmt de HAL F4/F7 (gpio/usart/adc) y ejemplos app-sandbox; re-habilitada la falla deliberada de bad_app. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
El job `doc` de CI (RUSTDOCFLAGS=-D warnings) fallaba por enlaces intra-doc a items privados o no resolubles, arrastrados de fases previas: - `Context` → `mpu::app_region_for` (módulo privado). - `time`: `[`now_ms`](crate::time::now_ms)` enlace explícito redundante. - `sched`: `SLICE_TICKS` (const privada) enlazada dos veces. - HAL F1 postmortem: `rugus_core::fault::FaultKind` (sin dependencia hacia rugus-core en scope). - ejemplos app-sandbox F4/F7: `[`main`]` no resoluble. Se degradan a spans de código (sin enlace) donde el destino no es público; el resto del workspace documenta limpio. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drift de formato preexistente que hacía fallar el paso `rustfmt (host crates)` del job `host` de CI, ahora que ese job también cubre rugus-host-tests. Solo reformatea un encadenamiento de métodos. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
rugus-host-tests(excluido del workspace embebido, std, triple nativo): 17 tests que ejercitan la lógica arch-agnóstica derugus-corecon unArchsimulado (MockArch).ABI_VERSION,Id::from_raw,validate_user_range/dispatch) y faults (FaultKind/FaultReport/Domain).rugus-core: featuretest-util(OFF por defecto, no se filtra a binarios del kernel) con semillas de prueba;syscall::usergateado atarget_arch = "arm"(trampolines SVC con r0..r3 no compilan en host).hostcorre fmt-check + clippy +cargo testdel nuevo crate.Test plan
cargo test --manifest-path crates/rugus-host-tests/Cargo.toml→ 17 passedcargo build --workspace --target thumbv7em-none-eabihf(exit 0)cargo build --workspace --target thumbv7m-none-eabi(exit 0)cargo fmt --all -- --checklimpio🤖 Generated with Claude Code