tests: Check that requesting tap name for virtio-net succeeds

When requesting a specific tap name with virtio-net check that that tap
device is created.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-05-07 10:01:53 +01:00 committed by Sebastien Boeuf
parent 006da0405e
commit 250f825f58

View File

@ -2202,6 +2202,13 @@ mod tests {
thread::sleep(std::time::Duration::new(20, 0));
let tap_count = std::process::Command::new("bash")
.arg("-c")
.arg("ip link | grep -c mytap1")
.output()
.expect("Expected checking of tap count to succeed");
aver_eq!(tb, String::from_utf8_lossy(&tap_count.stdout).trim(), "1");
// 3 network interfaces + default localhost ==> 4 interfaces
aver_eq!(
tb,