mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
tests: Check tap name provided is used for vhost_user_net tests
If a preferred tap name is given check that it is created. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
54b3329f0c
commit
006da0405e
@ -1306,6 +1306,15 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
thread::sleep(std::time::Duration::new(20, 0));
|
||||
|
||||
if let Some(tap_name) = tap {
|
||||
let tap_count = std::process::Command::new("bash")
|
||||
.arg("-c")
|
||||
.arg(format!("ip link | grep -c {}", tap_name))
|
||||
.output()
|
||||
.expect("Expected checking of tap count to succeed");
|
||||
aver_eq!(tb, String::from_utf8_lossy(&tap_count.stdout).trim(), "1");
|
||||
}
|
||||
// 1 network interface + default localhost ==> 2 interfaces
|
||||
// It's important to note that this test is fully exercising the
|
||||
// vhost-user-net implementation and the associated backend since
|
||||
|
Loading…
x
Reference in New Issue
Block a user