scripts: Run test container with the default bridge network

Using --net=host is not necessary for any of the integration tests, so
let's use the default network option called "bridge".

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2021-01-11 11:36:42 +01:00 committed by Rob Bradford
parent cb826aa2f1
commit 7889fc9207
3 changed files with 4 additions and 5 deletions

View File

@ -28,8 +28,7 @@ CTR_CLH_CARGO_TARGET="${CTR_CLH_CARGO_BUILT_DIR}/cargo_target"
CTR_CLH_INTEGRATION_WORKLOADS="/root/workloads"
# Container networking option
CTR_CLH_NET="host"
[ $(uname -m) = "aarch64" ] && CTR_CLH_NET="bridge"
CTR_CLH_NET="bridge"
# Cargo paths
# Full path to the cargo registry dir on the host. This appears on the host

View File

@ -189,10 +189,10 @@ cp $FW $VFIO_DIR
cp $VMLINUX_IMAGE $VFIO_DIR || exit 1
# VFIO test network setup.
# We reserve a different IP class for it: 172.17.0.0/24.
# We reserve a different IP class for it: 172.18.0.0/24.
sudo ip link add name vfio-br0 type bridge
sudo ip link set vfio-br0 up
sudo ip addr add 172.17.0.1/24 dev vfio-br0
sudo ip addr add 172.18.0.1/24 dev vfio-br0
sudo ip tuntap add vfio-tap0 mode tap
sudo ip link set vfio-tap0 master vfio-br0

View File

@ -3538,7 +3538,7 @@ mod tests {
// it is being added to the L2 VM through hotplugging mechanism.
fn test_vfio() {
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new_from_ip_range(&mut focal, "172.17", 0);
let guest = Guest::new_from_ip_range(&mut focal, "172.18", 0);
let mut workload_path = dirs::home_dir().unwrap();
workload_path.push("workloads");