Files
ghostty-rs/crates/ghostty-termio/tests/exec_integration.rs
T
ddidderr f9094c8152 feat: honor async-backend with epoll/io_uring, fix last RV13 items
Resolves the 4 P3 items in docs/rewrite/notes/review-rv13-codex.md
(final-Z16.md):
- async-backend now takes effect like Ghostty: ghostty_os::xev ports
  libxev's backend detection (io_uring, then epoll); global init detects
  and logs it, the GTK startup applies the config with Zig's messages,
  and +version reports the real backend. The termio IO loop runs on a
  new reactor with epoll, io_uring (io-uring crate) and poll(2) (kept
  for macOS, where libxev uses kqueue). The 21 exec integration tests
  run under every backend; io_uring was exercised here.
- auto-update-channel defaults to the build's release channel.
- Windows error names: sharing violation -> AccessDenied, plus
  ERROR_FILE_EXISTS -> PathAlreadyExists and virus errors ->
  AntivirusInterference, mirroring std.os.windows.OpenFile's NTSTATUS
  mapping in Zig 0.15.2 (verified against its source by the
  orchestrator).
- Exact ports of std.fs.path.basenameWindows/basenamePosix for theme
  name validation (drive, UNC and device roots).

Test Plan:
- cargo test --workspace --no-fail-fast (3555 passed, exit 0)
- just check-macos (both), just check-windows, just check-wasm
- +show-config --default --docs vs /usr/bin/ghostty (only the
  build-specific gtk-opengl-debug line differs)
2026-10-12 14:49:00 +02:00

27 lines
994 B
Rust

#![cfg(unix)]
#![allow(clippy::unwrap_used)]
//! End-to-end tests: real child processes on a real pty, driven through
//! `Termio` + `Thread` (IO thread) + the pty read thread, against a real
//! `Terminal`.
//!
//! The whole suite (`exec_integration/suite.rs`) runs once per IO thread
//! event loop backend (`async-backend`): `epoll`, `io_uring` (skipped, with a
//! message, where the kernel/sandbox denies it) and the portable `poll(2)`
//! loop used where libxev has a single different backend (kqueue).
macro_rules! suite {
($name:ident, $be:expr) => {
mod $name {
const UNDER_TEST: ghostty_os::xev::Backend = $be;
include!("exec_integration/suite.rs");
}
};
}
// `Kqueue` is not a candidate on Linux, so the reactor uses `poll(2)`.
suite!(poll, ghostty_os::xev::Backend::Kqueue);
#[cfg(target_os = "linux")]
suite!(epoll, ghostty_os::xev::Backend::Epoll);
#[cfg(target_os = "linux")]
suite!(io_uring, ghostty_os::xev::Backend::IoUring);