From f568f558d0a89483d56d9e7f4cdc39057378d9f4 Mon Sep 17 00:00:00 2001 From: lotherk Date: Sun, 22 Nov 2026 20:09:41 +0000 Subject: [PATCH] test_cli: an own cooldown dir, so a real quota file cannot bench the transport A cooldown file for "cli" in ~/.splinter/cooldown (left behind by a real Claude call) made the first 20 checks fail on main, unrelated to any change: the transport was skipped before it ran. The test now points SPLINTER_COOLDOWN_DIR at a fresh mkdtemp for the whole run. Proof: before, tests/test_cli reported 31 failures on a clean main with that file present; after, 'tests/test_cli: ok' and 'make check' passes. --- tests/test_cli.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_cli.c b/tests/test_cli.c index 4d8c76d..55cc7a4 100644 --- a/tests/test_cli.c +++ b/tests/test_cli.c @@ -136,6 +136,14 @@ main(void) return 1; setenv("SPLINTER_CLI_CMD", "sed 's/^/X: /'", 1); + /* + * A real cooldown file for "cli" in ~/.splinter/cooldown would bench this + * transport before it ever runs, and the test would report a broken + * transport. Every host here gets its own empty cooldown directory. + */ + snprintf(tdir, sizeof(tdir), "/tmp/splinter-cli-cool-XXXXXX"); + if (mkdtemp(tdir) != NULL) + setenv("SPLINTER_COOLDOWN_DIR", tdir, 1); host = sp_host_new(®, &ag, NULL); CHECK(host != NULL); CHECK(sp_plugin_load(host, "plugins/cli/cli.so", &err) == 0);