Skip to content

Commit 9a3fa7a

Browse files
Fix test_display_error vsock test
Error string changed. Adapt to new string Signed-off-by: Jonathan Woollett-Light <[email protected]> Co-authored-by: Babis Chalios <[email protected]>
1 parent fa21fc9 commit 9a3fa7a

File tree

1 file changed

+4
-11
lines changed
  • src/devices/src/virtio/vsock/csm

1 file changed

+4
-11
lines changed

src/devices/src/virtio/vsock/csm/mod.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,14 @@ mod tests {
152152
);
153153

154154
assert_eq!(
155-
format!(
156-
"{}",
157-
Error::TxBufFlush(std::io::Error::from(std::io::ErrorKind::Other))
158-
),
159-
"An I/O error occurred, when attempting to flush the connection TX buffer: other os \
160-
error"
155+
Error::TxBufFlush(std::io::Error::from(std::io::ErrorKind::Other)).to_string(),
156+
"An I/O error occurred, when attempting to flush the connection TX buffer: other error"
161157
);
162158

163159
assert_eq!(
164-
format!(
165-
"{}",
166-
Error::StreamWrite(std::io::Error::from(std::io::ErrorKind::Other))
167-
),
160+
Error::StreamWrite(std::io::Error::from(std::io::ErrorKind::Other)).to_string(),
168161
"An I/O error occurred, when attempting to write data to the host-side stream: other \
169-
os error"
162+
error"
170163
);
171164
}
172165
}

0 commit comments

Comments
 (0)