Daniel, Thanks for catching. Attached is v2, which adds `$!` to the `BAIL_OUT` message so a failed directory creation reports the underlying Windows error.
This does not change the test logic. The v1 results were 149/149 subtests passing on native ARM64 and the x64 cross-build with `needs_exe_wrapper=false`. Best, Harrison
From 8968f1a67dbd352c64be220a6693fdc863bfe632 Mon Sep 17 00:00:00 2001 From: Harrison Booth <[email protected]> Date: Sat, 25 Jul 2026 16:27:15 -0500 Subject: [PATCH v2] Fix pg_basebackup long-path test on Windows On Windows, the test creates a junction from the short system temporary directory to the build-tree temporary directory. Create the long-named tablespace directory through the short side of that junction. Otherwise, mkdir can exceed Windows' legacy directory path limit and silently fail, causing the later CREATE TABLESPACE command to report a missing directory. Check mkdir's result so any future setup failure is reported at its source. --- src/bin/pg_basebackup/t/010_pg_basebackup.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index cfcfdb8b580..581695c21ca 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -597,7 +597,8 @@ ok(-d "$tempdir/tbackup/tbl=spc2", 'tablespace with = sign was relocated'); $node->safe_psql('postgres', "DROP TABLESPACE tblspc2;"); rmtree("$tempdir/backup3"); -mkdir "$tempdir/$superlongname"; +mkdir "$real_sys_tempdir/$superlongname" + or BAIL_OUT "could not create $real_sys_tempdir/$superlongname: $!"; $realTsDir = "$real_sys_tempdir/$superlongname"; $node->safe_psql('postgres', "CREATE TABLESPACE tblspc3 LOCATION '$realTsDir';"); -- 2.53.0.windows.2
