diff --git a/tests/common/mod.rs b/tests/common/mod.rs index ec25b67ff3..a570d16f7e 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -19,10 +19,9 @@ use minigraf::db::{Minigraf, OpenOptions}; /// was ever really involved. Capping this binary to one fork in flight at a /// time keeps that window rare enough not to flake the suite. /// -/// This is now belt-and-braces: `FileBackend::open_with` (src/storage/backend/file.rs) -/// retries a cross-process `WouldBlock` with bounded backoff, which is the -/// real fix for the false-negative window described above. This mutex is -/// cheap insurance on top of that, not load-bearing on its own. +/// `FileBackend::open_with` retries a `WouldBlock` with bounded backoff +/// unless this process already has the file open. This mutex also keeps +/// two tests in this binary from forking at the same time. static CRASH_CHILD_SPAWN_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(()); /// Whether the crashing child commits `statements` as one explicit diff --git a/tests/disjunction_test.rs b/tests/disjunction_test.rs index 1f0fb49307..af8bfd3934 100644 --- a/tests/disjunction_test.rs +++ b/tests/disjunction_test.rs @@ -315,7 +315,7 @@ fn test_or_with_as_of() { #[test] fn test_or_with_not_cycle_rejected() { let db = db(); - // Bind ?x first so both or-branches have the same new-variable footprint (none). + // Bind ?x first so neither or branch introduces a new variable. db.execute(r#"(rule [(p ?x) [?x :a true] (or (and (not (q ?x))) [?x :a true])])"#) .unwrap(); let result = db.execute(r#"(rule [(q ?x) [?x :b true] (or (and (not (p ?x))) [?x :b true])])"#); diff --git a/tests/docker_lock_test.rs b/tests/docker_lock_test.rs index f70b32c26c..9fe6e6f1bf 100644 --- a/tests/docker_lock_test.rs +++ b/tests/docker_lock_test.rs @@ -1,11 +1,10 @@ -//! #324: kernel file locking, tier 3 — two containers sharing a Docker -//! volume, matching the deployment shape in the #317 report literally. +//! #324: test kernel file locking (tier 3) with two containers sharing a +//! Docker volume, as in #317. //! -//! Mechanically the same path as `tests/pid_namespace_test.rs` (tier 1): a -//! holder dies without running `Drop`, and a replacement sharing the same -//! storage must still be able to open the database. Docker gives it a real -//! `SIGKILL` and a genuinely separate PID namespace per container, rather -//! than `unshare` simulating one. +//! As in `tests/pid_namespace_test.rs` (tier 1), kill the lock holder without +//! running `Drop`, then check that a replacement can open the same database. +//! Docker sends `SIGKILL` and puts each container in its own PID namespace; +//! the tier 1 test uses `unshare`. //! //! Needs a working Docker daemon, which this sandbox does not have and which //! `.github/workflows/nfs-lock.yml` provisions on its runner. Skips cleanly diff --git a/tests/nfs_lock_test.rs b/tests/nfs_lock_test.rs index 58b8a8043f..1b541da63e 100644 --- a/tests/nfs_lock_test.rs +++ b/tests/nfs_lock_test.rs @@ -31,10 +31,9 @@ fn run_helper(helper: &Path, db: &Path, mode: &str) -> Output { .expect("run helper") } -/// The helper must reject an unrecognized mode string rather than silently -/// falling through to a plain open. Without this, a typo'd or unimplemented -/// mode (like `open-unlocked` before it exists) is indistinguishable from -/// `open` — exactly the false-green trap this guards against. +/// The helper must reject an unknown mode. If a misspelled or unimplemented +/// mode behaved like `open`, the test could pass without exercising the +/// intended case. #[test] fn test_unrecognized_mode_fails_loudly_instead_of_falling_through() { let helper = helper_binary();