From dc52a278de65a88054209f104bf4cfb2e24f2978 Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Mon, 21 Apr 2025 22:53:48 +0800 Subject: [PATCH] build_helper: temporarily swallow remove dir failure Due to very high failure rate of `tests/mir-opt/strip_debuginfo.rs` for unknown reasons, cf. . --- src/build_helper/src/fs/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/build_helper/src/fs/mod.rs b/src/build_helper/src/fs/mod.rs index 123df76e6a2e9..ffca68b407f5e 100644 --- a/src/build_helper/src/fs/mod.rs +++ b/src/build_helper/src/fs/mod.rs @@ -100,6 +100,10 @@ where pub fn remove_and_create_dir_all>(path: P) -> io::Result<()> { let path = path.as_ref(); - recursive_remove(path)?; + // FIXME(#134351): for reasons that are not clear yet, `tests/mir-opt/strip_debuginfo.rs` + // triggers various permission denied and dir not empty failures too frequently. Temporarily + // swallow the remove dir failure to make CI failure rate tolerable, but this is mostly likely + // masking a genuine bug, possibly some kind of race condition. + let _ = recursive_remove(path); fs::create_dir_all(path) }