diff --git a/tests/test_cli.c b/tests/test_cli.c index a308a9b1d..da2c49c22 100644 --- a/tests/test_cli.c +++ b/tests/test_cli.c @@ -14660,7 +14660,7 @@ static int hl_run_hook(const char *home, const char *cache_dir) { * near-1 KiB path can be neither created nor probed, which hides the very * cut-off file these tests look for. */ static bool hl_make_root(char *root, size_t root_sz) { - char tmpl[64]; + char tmpl[256]; char real[4096]; snprintf(tmpl, sizeof(tmpl), "/tmp/cbm-hooklog-XXXXXX"); if (!cbm_mkdtemp(tmpl)) { diff --git a/tests/test_index_resilience.c b/tests/test_index_resilience.c index 22cd230bd..dfae82db3 100644 --- a/tests/test_index_resilience.c +++ b/tests/test_index_resilience.c @@ -298,7 +298,9 @@ TEST(index_long_log_override_writes_no_cut_path) { * root has its links resolved: the kernel bounds the EXPANDED path, and * under macOS's /tmp -> /private/tmp link a near-1 KiB path can be neither * created nor probed, which would hide the cut-off file. */ - char tmpl[64]; + /* cbm_mkdtemp writes the %TEMP%-expanded path back on Windows, so the + * template buffer needs the 256 bytes that compat.h asks for. */ + char tmpl[256]; char logroot[4096]; snprintf(tmpl, sizeof(tmpl), "/tmp/cbm_resil_log_XXXXXX"); if (!cbm_mkdtemp(tmpl)) {