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

Fix sequential write test with O_RDWR flag #393

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

passaro
Copy link
Contributor

@passaro passaro commented Jul 20, 2023

Description of change

Some of the sequential write tests were testing that once a new file is opened with O_RDWR and written to, a read on it will fail with EBADF. The issue was that the read in the test was performed at the EOF, which would result in different fuse calls depending on the kernel version: for example on 5.15, fuse read would be called with a "valid" offset and the expected EBADF would be returned (as we were observing in GitHub Actions), but on 6.1, a getattr would check that the current position was EOF and succeed the read call by returning 0.

The fix seeks back 1 byte before trying to read it.

Does this change impact existing behavior?

No. Only tests are affected.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
@passaro passaro temporarily deployed to PR integration tests July 20, 2023 09:26 — with GitHub Actions Inactive
@passaro passaro temporarily deployed to PR integration tests July 20, 2023 09:26 — with GitHub Actions Inactive
@passaro passaro temporarily deployed to PR integration tests July 20, 2023 09:26 — with GitHub Actions Inactive
@passaro passaro temporarily deployed to PR integration tests July 20, 2023 09:26 — with GitHub Actions Inactive
@passaro passaro requested a review from monthonk July 20, 2023 09:26
Copy link
Contributor

@monthonk monthonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@monthonk monthonk added this pull request to the merge queue Jul 20, 2023
Merged via the queue into awslabs:main with commit ef35149 Jul 20, 2023
16 checks passed
@passaro passaro deleted the fix-write-test branch July 21, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants