Skip to content

Conversation

stefano-garzarella
Copy link
Member

Please summarize here why the changes in this PR are needed.

Add a new section in the README to explain some requirements to run tests, e.g.
vsock_loopback kernel module is required if backend_vsock feature
is enabled (true by default) when running tests.

Use VMADDR_CID_LOCAL instead of its value in the tests and panic early
in some tests, to make clear that vsock_loopback is a requirement

CC @stsquad

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

Instead of using the direct value (1), let's use the constant value
provided by the vsock crate.

VMADDR_CID_LOCAL is used for loopback communication, which is used
in some of our test cases.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
test_vsock_thread_backend_vsock() and test_vsock_thread_vsock_backend()
tests use VMADDR_CID_LOCAL which is provided by the `vsock_loopback`
kernel module.

If `vsock_loopback` kernel module is not loaded, these tests will fail
later with unclear messages, so it can be hard to debug.

Let's fail early and print a message with the requirement.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Add a new section to explain some requirements to run tests, e.g.
`vsock_loopback` kernel module is required if `backend_vsock` feature
is enabled (true by default) when running tests.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
@stefano-garzarella
Copy link
Member Author

v2:

  • fixed build issue moving the use vsock::VMADDR_CID_LOCAL in the test

@vireshk vireshk merged commit da2084d into rust-vmm:main Dec 6, 2024
2 checks passed
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.

3 participants