-
Notifications
You must be signed in to change notification settings - Fork 3k
Merge feature-posix branch (FileHandle::truncate) #8972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3596db7
to
ab11825
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, keeping this out of tree doesn't help anyone
@kjbracey-arm thanks for maintaining this branch, @dannybenor fyi
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@kjbracey-arm Is it safe to delete the |
Yes, can delete the feature branch delete when this is merged. No further changes planned - it was created as a one-off to hold this PR pending further discussion/review. |
@kjbracey-arm If b42dbf0 can be cherry-picked into its own branch and PR, it can be taken into 5.11.1. Then we can merge this PR for 5.12.0. Afaik, that commit is the only one that would cause 5.11.1 release issues if we were to merge this PR now. |
ARM C library is really good at optimising out calls to underlying seek. The only ones we were actually detecting in the empty file case were the ones that the default FileHandle::size() made itself during the SEEK_END case. When we implement TestFile::size() directly, we will no longer see a single seek call from the ARM C library in the empty file case, so remove those tests. Beef up the non-empty file case, adding checks that we are making underlying read+write calls in the correct position, as a proxy for direct checks for underlying seek being called.
Add support for file truncation (or extension) to the abstract API. No hooks to actual implementations in this commit.
- File::truncate - FileSystem::file_truncate - FATFileSystem::file_truncate - LittleFileSystem::file_truncate
14e4ad6
to
8db2c0d
Compare
Rebased, formatting fixes squashed in, and fseek/ftell test refactor moved to front so it can be a separate PR. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Merge feature branch
feature-posix
, which contains just theFileHandle::truncate
extension from #7162.Pull request type
Fixes #7010