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.
This commit is contained in:
Zhengchao An
2026-07-12 06:01:39 +08:00
committed by GitHub
parent 676f2276b4
commit a5765274fc
+5 -1
View File
@@ -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 {