[PR #1994] [CLOSED] Fixed a test_truncate_cache failure on macos #2290

Closed
opened 2026-03-04 02:04:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1994
Author: @ggtakec
Created: 7/22/2022
Status: Closed

Base: masterHead: fix_about_list_bucket


📝 Commits (1)

  • 03bcddb Fixed a test_truncate_cache failure on macos

📊 Changes

1 file changed (+7 additions, -6 deletions)

View changed files

📝 src/s3fs_xml.cpp (+7 -6)

📄 Description

Relevant Issue (if applicable)

#1987

Details

About #1987, I found out where test_truncate_cache sometimes fails on macos.

It happens with rm -rf $ (seq 2) in test_truncate_cache test.
When deleting two directories, s3fs_rmdir fails because sometimes files remain in the directories.

When FUSE receives a system call to delete a directory, it lists the files in the directory.
It then deletes each of the listed files in turn(s3fs_unlink), deletes them all, and then calls s3fs_rmdir.
For macos(which may also happen on Linux?), any files were missing from the list of files in this directory at deleting each one.

The location of the problem has been identified and it has been fixed (as much as possible) with this PR code.
(However, it remains unclear why the value of that buffer changed.)

This PR should be applied early to avoid failing on macos tests.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/1994 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 7/22/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix_about_list_bucket` --- ### 📝 Commits (1) - [`03bcddb`](https://github.com/s3fs-fuse/s3fs-fuse/commit/03bcddb5e681740e11dada1be80d1757b004d5b6) Fixed a test_truncate_cache failure on macos ### 📊 Changes **1 file changed** (+7 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/s3fs_xml.cpp` (+7 -6) </details> ### 📄 Description ### Relevant Issue (if applicable) #1987 ### Details About #1987, I found out where `test_truncate_cache` sometimes fails on macos. It happens with `rm -rf $ (seq 2)` in `test_truncate_cache` test. When deleting two directories, `s3fs_rmdir` fails because sometimes files remain in the directories. When FUSE receives a system call to delete a directory, it lists the files in the directory. It then deletes each of the listed files in turn(`s3fs_unlink`), deletes them all, and then calls `s3fs_rmdir`. For macos(which may also happen on Linux?), any files were missing from the list of files in this directory at deleting each one. The location of the problem has been identified and it has been fixed (as much as possible) with this PR code. _(However, it remains unclear why the value of that buffer changed.)_ This PR should be applied early to avoid failing on macos tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:04:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2290
No description provided.