Conversation
|
Plz review @stefano-garzarella @germag @osteffenrh |
| for fd_offset in 0..fds_count { | ||
| for fd_offset in 0..fds_to_be_copied_count { |
There was a problem hiding this comment.
as I mentioned in my email, why this change?
There was a problem hiding this comment.
If use fds_count, the test will report an error on macos:
fatal runtime error: IO Safety violation: owned file descriptor already closed, aborting
Since the value of the fds_count is 4 on macos. But on linux, this value is 2. But my solution may be a wrong solution
There was a problem hiding this comment.
but, this is the type of thing you must tell us (email, chat or in the meeting) instead of just making a change without any comment.
There was a problem hiding this comment.
Run send_more_recv_less2 or send_more_recv_less1
On macos, cmsg.cmsg_len is 28 and CMSG_LEN(0) is 12, so the fds_count is 4.
On linux, cmsg.cmsg_len is 24 and CMSG_LEN(0) is 16, the fds_count is 2.
Run send_recv_with_fd or send_recv_only_fd:
On macos, cmsg.cmsg_len is 16 and CMSG_LEN(0) is 12
On linux, cmsg.cmsg_len is 20 and CMSG_LEN(0) is 16
152a5cc to
272a92d
Compare
| for fd_offset in 0..fds_count { | ||
| for fd_offset in 0..fds_to_be_copied_count { |
466a3b7 to
1b720ae
Compare
Bumps [rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci) from `c3ef897` to `aa2f8a9`. - [Commits](rust-vmm/rust-vmm-ci@c3ef897...aa2f8a9) --- updated-dependencies: - dependency-name: rust-vmm-ci dependency-version: aa2f8a90e46533de8a58f19cd0c417de856d4437 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Eventfd is linux-specific. In order to support macos and others, we need to replace it with pipefd. Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
libc also provides functions with the same functionality and supports multiple platforms, so we can replace CMSG_*! with libc equivalent. Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
Make some modifications to sock_ctl_msg to support Unix systems. Including adjusting the size of cmsg_len for different platforms. Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
If we use fds_count, the test will report an error on macos: ``` fatal runtime error: IO Safety violation: owned file descriptor already closed, aborting ``` When running send_more_recv_less2 or send_more_recv_less1 on macos, cmsg.cmsg_len is 28 and CMSG_LEN(0) is 12, which cause fds_count is 4. Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
|
See: rust-vmm#245 |
No description provided.