cosca 0.7.0

Unified cross-platform subprocess management: spawning, stdio, process trees, stable identity, and elevation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use rustix::io::Errno;

use super::proc_probe_failure;

#[skuld::test]
fn only_a_missing_proc_says_proc_must_be_mounted() {
    let path = "/proc/thread-self/fd/5";
    let missing = proc_probe_failure(path, Errno::NOENT);
    assert!(missing.starts_with("/proc must be mounted"), "{missing}");
    for errno in [Errno::ACCESS, Errno::NOTDIR, Errno::LOOP, Errno::IO] {
        let other = proc_probe_failure(path, errno);
        assert!(!other.contains("must be mounted"), "{errno}: {other}");
        assert!(other.contains(path) && other.contains(&errno.to_string()), "{other}");
    }
}