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

volatile-memory: add split_at() #126

Merged
merged 1 commit into from
Dec 12, 2020
Merged

Conversation

elmarco
Copy link
Contributor

@elmarco elmarco commented Dec 11, 2020

This will come handy to implement rust-vmm/vm-virtio#33

@elmarco
Copy link
Contributor Author

elmarco commented Dec 11, 2020

buildkite failure isn't fair:

pytest rust-vmm-ci/integration_tests/test_coverage.py
FAILED rust-vmm-ci/integration_tests/test_coverage.py::test_coverage - AssertionError: Coverage is increased from 85.5 to 85.6. Please update the coverage in tests/coverage.

@andreeaflorescu
Copy link
Member

@elmarco yeah, that's not nice indeed. It isn't buidlkite's fault though, it is ours because the coverage test is implemented such that if the coverage is not the same as the one configured in coverage_config_x86_64.json, the test fails. You'll need to manually update the coverage score so that the test passes. It is a bit bizarre though that the coverage is increased when the code you added is not tested.

@elmarco
Copy link
Contributor Author

elmarco commented Dec 11, 2020

@andreeaflorescu the added code is covered by the example test

@jiangliu
Copy link
Member

This will come handy to implement rust-vmm/vm-virtio#33

when does it need to split a slice buffer into reader and writer parter?
According to virtio spec, a descriptor will be readonly or write-only, what's the case where a buffer will be rw?

@elmarco
Copy link
Contributor Author

elmarco commented Dec 11, 2020

when does it need to split a slice buffer into reader and writer parter?
According to virtio spec, a descriptor will be readonly or write-only, what's the case where a buffer will be rw?

This is not the concern here, but rather of DescriptorChainConsumer in rust-vmm/vm-virtio#33. It collects the readable() buffers for the Reader, and writable for the Writer. There is thus no buffer that can be dual read & write.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
@bonzini
Copy link
Member

bonzini commented Dec 11, 2020

Looks good once the coverage % is fixed.

@bonzini bonzini merged commit 6c7c9cb into rust-vmm:master Dec 12, 2020
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.

4 participants