testkit: fix native helper links in Wasm documentation

This commit is contained in:
dotCooCoo committed 2026-11-26 16:15:14 -08:00
1 parent 0ebc5915b0
commit 77b42ea1eb
2 files changed
+14 -14

No files matched your search

+7 -7
View File
@@ -7,13 +7,13 @@
//! a failing case can be found again from its label. It builds for every target, `wasm32`
//! included.
//!
//! [`hammer`] runs a parser on the unmodified seed, on every truncation of it and on the
//! `hammer` runs a parser on the unmodified seed, on every truncation of it and on the
//! mutations, one case after another on a worker thread, with a time limit for each case. It fails
//! the test, naming the case and the input length, when the parser panics or does not finish in
//! time. The number of rounds is a count the caller gives, multiplied by a variable the caller
//! names. [`DIVISOR_VARIABLE`] (`CRAFT_HOSTILE_DIVISOR`) runs a fraction of every sweep for quick
//! runs such as pull requests: every N-th truncation and 1/N of the rounds; [`divisor`] reads it
//! for sweeps written without [`hammer`]. [`hammer`], [`HammerConfig`] and [`divisor`] are not
//! runs such as pull requests: every N-th truncation and 1/N of the rounds; `divisor` reads it
//! for sweeps written without `hammer`. `hammer`, `HammerConfig` and `divisor` are not
//! built for `wasm32`.
use std::fmt::Write as _;
@@ -39,11 +39,11 @@ use std::time::{Duration, Instant};
#[cfg(not(target_arch = "wasm32"))]
const WORKER_NAME: &str = "craft-testkit hostile";
/// The variable that multiplies a [`HammerConfig`]'s rounds unless
/// [`HammerConfig::with_multiplier_variable`] names another.
/// The variable that multiplies a `HammerConfig`'s rounds unless
/// `HammerConfig::with_multiplier_variable` names another.
pub const DEFAULT_MULTIPLIER_VARIABLE: &str = "CRAFT_HOSTILE_MULT";
/// The variable that divides every hostile-input sweep: with `N`, [`hammer`] runs the unmodified
/// The variable that divides every hostile-input sweep: with `N`, `hammer` runs the unmodified
/// seed, every N-th truncation (lengths 0, N, 2N, ...) and 1/N of its rounds, rounded up. Unset, or
/// 1, runs everything. The Workspace gate sets it and the nightly full run leaves it unset; a
/// failing case is found again with the same value.
@@ -54,7 +54,7 @@ pub const DIVISOR_VARIABLE: &str = "CRAFT_HOSTILE_DIVISOR";
#[cfg(not(target_arch = "wasm32"))]
pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(5);
/// The most cases one [`hammer`] call runs: the unmodified seed, its truncations and the rounds
/// The most cases one `hammer` call runs: the unmodified seed, its truncations and the rounds
/// together. A call that would run more fails before it runs any.
pub const MAX_CASES: usize = 10_000_000;
+7 -7
View File
@@ -11,24 +11,24 @@
//! (or of `f16` for an `h` suffix), which browser WebGPU compilers reject.
//! * [`guards::std_instant`]: flags uses of `std::time::Instant` in code paths targeting the web,
//! where `std::time::Instant::now()` panics on `wasm32`.
//! * [`guards::rust_sources`]: directory crawler collecting `.rs` sources while excluding tests, with
//! size limits ([`guards::rust_sources_with_limits`]). It is not built for `wasm32`.
//! * `guards::rust_sources`: directory crawler collecting `.rs` sources while excluding tests, with
//! size limits (`guards::rust_sources_with_limits`). It is not built for `wasm32`.
//!
//! [`rng`] holds two seeded generators for repeatable test input, [`rng::XorShift64`] and
//! [`rng::XorShift64Star`], each with `next`, `below`, `byte` and `fill`.
//!
//! On targets other than `wasm32`, [`deadline::with_deadline`] runs a test body on its own thread
//! and fails the test when the body does not finish within its limit, and [`deadline::wait_until`]
//! On targets other than `wasm32`, `deadline::with_deadline` runs a test body on its own thread
//! and fails the test when the body does not finish within its limit, and `deadline::wait_until`
//! polls a condition until it holds and fails the test when the limit passes first. Both read an
//! optional limit variable that the caller names, `CRAFT_TEST_TIMEOUT_SECS` by default.
//!
//! [`hostile::mutations`] yields a fixed sequence of damaged copies of a valid seed, on every
//! target. On targets other than `wasm32`, [`hostile::hammer`] runs a parser on the seed, every
//! target. On targets other than `wasm32`, `hostile::hammer` runs a parser on the seed, every
//! truncation of it and those copies, one after another on a worker thread with a time limit for
//! each, and fails the test with the case that panicked or did not finish.
//!
//! On targets other than `wasm32`, [`serial`] holds [`serial::TestLock`], a lock that a `static`
//! can hold and that the thread holding it can take again, and [`serial::gpu_lock`], the one lock
//! On targets other than `wasm32`, `serial` holds `serial::TestLock`, a lock that a `static`
//! can hold and that the thread holding it can take again, and `serial::gpu_lock`, the one lock
//! for GPU tests. Every GPU test in a process must take this lock, because a test that takes a
//! different lock can run at the same time as one that takes this one.
//!