tests: Extend test_tap_from_fd to reboot

Check that the VM comes back with the correct network setup after a
reboot.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-04-22 10:26:29 +01:00 committed by Sebastien Boeuf
parent da58b65997
commit fd72612e91

View File

@ -5393,6 +5393,17 @@ mod tests {
.unwrap_or_default(),
2
);
guest.ssh_command("sudo reboot").unwrap();
guest.wait_vm_boot(None).unwrap();
assert_eq!(
guest
.ssh_command("ip -o link | wc -l")
.unwrap()
.trim()
.parse::<u32>()
.unwrap_or_default(),
2
);
});
let _ = child.kill();