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

Rework fseek/ftell tests #9109

Merged
merged 1 commit into from
Dec 17, 2018
Merged

Rework fseek/ftell tests #9109

merged 1 commit into from
Dec 17, 2018

Conversation

kjbracey
Copy link
Contributor

Description

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.

Commit extracted from #8972 so it can go to 5.11.1

Pull request type

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

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.
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 17, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 17, 2018

Test run: SUCCESS

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

@cmonr cmonr merged commit eed3fb1 into ARMmbed:master Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants