Issue #1249: A test cannot name the toolchain that runs it; 27 tests read it out of /proc

Open and answer this issue on GitHub.

std, ready · opened 2026-11-05 · updated 2026-11-05 · 0 comments

27 tests in tests/compiler/tests/ that run the toolchain themselves (nikaia fmt, nikaia build, …) copy the same helper to find it:

fn toolchain() -> String throws {
	let exe = process::run("sh", ["-c", "e=$(readlink /proc/$(cut -d' ' -f4 /proc/$PPID/stat)/exe); [ \"$(basename \"$e\")\" = nikaia ] && echo \"$e\""]).stdout.trim().clone()
	if exe.len() > 0 { return exe }
	return "target/fast/nikaia"
}

It reads the grandparent process out of /proc (Linux only) and falls back to target/fast/nikaia, a path CI does not have. When a test is started some other way, the lookup misses, the fallback is wrong and the test fails with “no such file or directory: target/fast/nikaia”. This happened to async_parse_fmt_formats_every_form in a builder’s run, on the binary before its change as well. A test has no way in Nikaia to name the toolchain that runs it.

To build


Generated by Claude Code

Back to Open Issues