Skip to content

Commit

Permalink
derive Debug for DeviceFd
Browse files Browse the repository at this point in the history
Without this derive it is hard to write negative tests because we cannot
do unwrap_err.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
  • Loading branch information
andreeaflorescu authored and jiangliu committed Nov 17, 2021
1 parent ed0bf1b commit d2e8ee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion coverage_config_x86_64.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"coverage_score": 88.0,
"coverage_score": 87.7,
"exclude_path": "",
"crate_features": ""
}
1 change: 1 addition & 0 deletions src/ioctls/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use vmm_sys_util::errno;
use vmm_sys_util::ioctl::{ioctl_with_mut_ref, ioctl_with_ref};

/// Wrapper over the file descriptor obtained when creating an emulated device in the kernel.
#[derive(Debug)]
pub struct DeviceFd {
fd: File,
}
Expand Down

0 comments on commit d2e8ee1

Please sign in to comment.