From a286e960ed8de6acc4d59ef6833e115d3972a36f Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Thu, 7 Jan 2021 06:49:04 -0800 Subject: [PATCH] tests: Remove the check on the "booted" message in 'wait_vm_boot()' Given we already check the connected IP address matches the expected guest IP address, the check on the "booted" message is not needed. Fixes: #2117 Signed-off-by: Bo Chen Signed-off-by: Rob Bradford --- tests/integration.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index dc3bb9c20..e81b16baa 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -641,7 +641,6 @@ mod tests { ReadToString(std::io::Error), SetReadTimeout(std::io::Error), WrongGuestAddr, - WrongGuestMsg, } impl std::error::Error for Error {} @@ -871,7 +870,7 @@ mod tests { } match listener.accept() { - Ok((mut stream, addr)) => { + Ok((_, addr)) => { // Make sure the connection is from the expected 'guest_addr' if addr.ip() != std::net::IpAddr::from_str(expected_guest_addr).unwrap() { s = format!( @@ -882,22 +881,6 @@ mod tests { return Err(Error::WrongGuestAddr); } - // Make sure the right message is to notify the guest VM is booted - let mut data = String::new(); - stream - .set_read_timeout(Some(std::time::Duration::new(timeout as u64, 0))) - .map_err(Error::SetReadTimeout)?; - stream - .read_to_string(&mut data) - .map_err(Error::ReadToString)?; - if data != DEFAULT_TCP_LISTENER_MESSAGE { - s = format!( - "Expecting the guest message '{}' while receiving the message '{}'", - DEFAULT_TCP_LISTENER_MESSAGE, data - ); - return Err(Error::WrongGuestMsg); - }; - Ok(()) } Err(e) => {