Sprint 0 — industrialisation : CI, tracing, tests xdg-shell, GPLv3

5 livrables d'industrialisation posés avant la phase 13 (client réel).

- .gitlab-ci.yml : pipeline minimal (fmt-check + tests core +
  tests frontend nightly). Pas de cross-compile Redox dans le MVP.
- rustfmt.toml + fmt.sh : config formatter racine + boucle sur les 23
  crates ; fmt sweep appliqué (d'où les diffs cosmétiques).
- tracing dans wayland-frontend : 22 println/eprintln remplacés par
  debug/info/warn/error selon sévérité. Préfixe "[frontend]"
  supprimé (le target tracing le fournit).
- tracing-subscriber dans le compositor : TeeWriter écrit sur
  stdout + /scheme/debug, filtre via RUST_LOG (défaut info).
  DebugSink/dlog supprimés.
- 15 tests unitaires xdg-shell après extraction de 2 helpers libres
  (clamp_to_min_max + should_throttle_configure). Couvre
  compute_resize_geom, contraintes min/max et throttling configure.
- LICENSE (GPLv3 texte officiel FSF) + .editorconfig.

Total tests : 27 → 42 automatisés (compositor-core + frontend).

Leyoda 2026 – GPLv3
This commit is contained in:
Votre Nom 2026-05-14 20:46:07 +02:00
parent 2150f31d82
commit 8795f39f08
30 changed files with 1373 additions and 298 deletions

View file

@ -111,7 +111,10 @@ unsafe fn recv_fd_from(socket: RawFd) -> Result<OwnedFd, String> {
if n < 0 {
return Err(format!("recvmsg: {}", errno_str()));
}
println!("[test-02] recvmsg got {n} bytes + control of {} bytes", msg.msg_controllen);
println!(
"[test-02] recvmsg got {n} bytes + control of {} bytes",
msg.msg_controllen
);
let cmsg = libc::CMSG_FIRSTHDR(&msg);
if cmsg.is_null() {
@ -147,7 +150,10 @@ fn run() -> Result<(), String> {
if dup_fd < 0 {
return Err(format!("dup: {}", errno_str()));
}
println!("[test-02] dup'd tmp_fd ({}) -> {dup_fd}", tmp_fd.as_raw_fd());
println!(
"[test-02] dup'd tmp_fd ({}) -> {dup_fd}",
tmp_fd.as_raw_fd()
);
send_fd_over(sock_a.as_raw_fd(), dup_fd)?;
let received = recv_fd_from(sock_b.as_raw_fd())?;
@ -165,11 +171,16 @@ fn run() -> Result<(), String> {
let mut readback = vec![0u8; MARKER.len()];
let n = libc::read(recv_raw, readback.as_mut_ptr() as *mut _, readback.len());
if n != MARKER.len() as isize {
return Err(format!("read from received fd: only {n} bytes (errno {})",
io::Error::last_os_error().raw_os_error().unwrap_or(0)));
return Err(format!(
"read from received fd: only {n} bytes (errno {})",
io::Error::last_os_error().raw_os_error().unwrap_or(0)
));
}
if readback != MARKER {
return Err(format!("marker mismatch: got {:?}", String::from_utf8_lossy(&readback)));
return Err(format!(
"marker mismatch: got {:?}",
String::from_utf8_lossy(&readback)
));
}
println!("[test-02] read {} bytes via received fd: marker matches", n);