From a5765274fc75663d431c69595999ffe015716757 Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Sun, 12 Jul 2026 06:01:39 +0800 Subject: [PATCH] fix: auto-repair test_rename_data_shares_file_sync_limit hang on macOS (#4758) fix(test): use canonicalized disk root for file_sync_probe in rename_data test On macOS, tempfile::tempdir returns /var/folders/... while LocalDisk resolves the root to /private/var/folders/... via dunce::canonicalize. The file_sync_probe::enter() path check uses starts_with(), so passing the non-canonical tempdir path caused the probe to never activate, making wait_for_active() hang indefinitely. Use disk.root (already canonicalized) for the probe instead. --- crates/ecstore/src/disk/local.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/ecstore/src/disk/local.rs b/crates/ecstore/src/disk/local.rs index 94a7c0686..b006ff7df 100644 --- a/crates/ecstore/src/disk/local.rs +++ b/crates/ecstore/src/disk/local.rs @@ -9039,7 +9039,11 @@ mod test { } } - let _probe = os::file_sync_probe::set_blocking(dir.path()); + // Use the disk's canonicalized root path — on macOS, tempfile returns + // /var/folders/... while LocalDisk resolves to /private/var/folders/... + // via dunce::canonicalize. The probe's starts_with check would fail + // with the non-canonical path, causing wait_for_active to hang. + let _probe = os::file_sync_probe::set_blocking(&disk.root); let first = { let disk = disk.clone(); tokio::spawn(async move {