Skip to content

Conversation

@DeathWish5
Copy link
Contributor

add datagram for socket, set capacity limit for socket.
pass almost all core-tests, two of which failed due to a bug of vmar

delete debug print

run cargo clippy
@coveralls
Copy link

coveralls commented May 16, 2020

Pull Request Test Coverage Report for Build 107314994

  • 0 of 93 (0.0%) changed or added relevant lines in 2 files are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 22.202%

Changes Missing Coverage Covered Lines Changed/Added Lines %
zircon-syscall/src/socket.rs 0 23 0.0%
zircon-object/src/ipc/socket.rs 0 70 0.0%
Files with Coverage Reduction New Missed Lines %
zircon-object/src/ipc/socket.rs 6 0%
Totals Coverage Status
Change from base Build 106305047: -0.08%
Covered Lines: 1702
Relevant Lines: 7666

💛 - Coveralls

@wangrunji0408 wangrunji0408 self-requested a review May 16, 2020 16:11
@wangrunji0408 wangrunji0408 added the enhancement New feature or request label May 16, 2020
const SOCKET_CONTROL_READABLE = 1 << 6;
const SOCKET_CONTROL_WRITABLE = 1 << 7;
const SCOEKT_ACCEPT = 1 << 8;
const SOCKET_SHARE = 1 << 9;
Copy link
Member

@wangrunji0408 wangrunji0408 May 16, 2020

Choose a reason for hiding this comment

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

reorder them between 5 and 10

let _peer = self.peer.upgrade().ok_or(ZxError::PEER_CLOSED)?;
if inner.read_disabled {
/// Write data to the socket.
pub fn write(&self, options: SocketFlags, data: &[u8], count: usize) -> ZxResult<usize> {
Copy link
Member

@wangrunji0408 wangrunji0408 May 16, 2020

Choose a reason for hiding this comment

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

count is unnecessary, it's equal to data.len()

}
}

pub fn write_control(&self, data: &[u8], count: usize) -> ZxResult<usize> {
Copy link
Member

@wangrunji0408 wangrunji0408 May 16, 2020

Choose a reason for hiding this comment

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

remove pub for internal functions

@wangrunji0408
Copy link
Member

And don't forget to run cargo fmt and cargo clippy

cargo fmt and clippy
@DeathWish5 DeathWish5 closed this May 17, 2020
@wangrunji0408 wangrunji0408 added the duplicate This issue or pull request already exists label May 18, 2020
@coveralls
Copy link

coveralls commented Jul 14, 2024

Pull Request Test Coverage Report for Build 106667640

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 199 (0.0%) changed or added relevant lines in 2 files are covered.
  • 40 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.4%) to 21.88%

Changes Missing Coverage Covered Lines Changed/Added Lines %
zircon-syscall/src/socket.rs 0 24 0.0%
zircon-object/src/ipc/socket.rs 0 175 0.0%
Files with Coverage Reduction New Missed Lines %
zircon-syscall/src/socket.rs 8 0.0%
zircon-object/src/ipc/socket.rs 32 0.0%
Totals Coverage Status
Change from base Build 106305047: -0.4%
Covered Lines: 1704
Relevant Lines: 7788

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants