Skip to content
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

Merge feature-posix branch (FileHandle::truncate) #8972

Merged
merged 4 commits into from Dec 17, 2018

Conversation

Projects
None yet
8 participants
@kjbracey-arm
Copy link
Contributor

commented Dec 5, 2018

Description

Merge feature branch feature-posix, which contains just the FileHandle::truncate extension from #7162.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[X] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Fixes #7010

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:merge_file_truncate branch to ab11825 Dec 5, 2018

@0xc0170 0xc0170 requested a review from ARMmbed/mbed-os-core Dec 5, 2018

@cmonr cmonr requested a review from geky Dec 5, 2018

@geky

geky approved these changes Dec 5, 2018

Copy link
Member

left a comment

Looks good to me, keeping this out of tree doesn't help anyone

@kjbracey-arm thanks for maintaining this branch, @dannybenor fyi

@cmonr cmonr requested a review from dannybenor Dec 6, 2018

@0xc0170

0xc0170 approved these changes Dec 6, 2018

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Dec 6, 2018

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Dec 6, 2018

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Dec 6, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Dec 7, 2018

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2018

@kjbracey-arm Is it safe to delete the feature-posix once this comes in?

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Dec 7, 2018

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.

@cmonr cmonr added the do not merge label Dec 7, 2018

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Dec 14, 2018

@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.

kjbracey-arm and others added some commits Oct 30, 2018

Rework fseek/ftell tests
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 FileHandle::truncate and ftruncate
Add support for file truncation (or extension) to the abstract API.

No hooks to actual implementations in this commit.
Added filesystem implementations of truncate
- File::truncate
- FileSystem::file_truncate
- FATFileSystem::file_truncate
- LittleFileSystem::file_truncate

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:merge_file_truncate branch to 8db2c0d Dec 14, 2018

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Dec 14, 2018

Rebased, formatting fixes squashed in, and fseek/ftell test refactor moved to front so it can be a separate PR.

@NirSonnenschein

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2018

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Dec 17, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Dec 17, 2018

@cmonr cmonr merged commit 80c6f5f into ARMmbed:master Dec 17, 2018

21 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+16 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 0 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10157 cycles (+949 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Dec 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.