mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
src: Add integration test for vhost-user-net backend
An integration test relying on the new vhost-user-net backend now replaces the previous test using the QEMU test backend. This allows us to avoid building the QEMU backend, and we now really exercise the vhost-user-net implementation as it is used for the ssh communication in this test. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
f6d1a9d9b8
commit
8c33eb3069
@@ -78,7 +78,6 @@ if [ ! -f "$VMLINUX_IMAGE" ]; then
|
||||
fi
|
||||
|
||||
VIRTIOFSD="$WORKLOADS_DIR/virtiofsd"
|
||||
VUBRIDGE="$WORKLOADS_DIR/vubridge"
|
||||
VUBD="$WORKLOADS_DIR/vubd"
|
||||
QEMU_DIR="qemu_build"
|
||||
if [ ! -f "$VIRTIOFSD" ] || [ ! -f "$VUBRIDGE" ] || [ ! -f "$VUBD" ]; then
|
||||
@@ -86,9 +85,8 @@ if [ ! -f "$VIRTIOFSD" ] || [ ! -f "$VUBRIDGE" ] || [ ! -f "$VUBD" ]; then
|
||||
git clone --depth 1 "https://github.com/sboeuf/qemu.git" -b "virtio-fs" $QEMU_DIR
|
||||
pushd $QEMU_DIR
|
||||
./configure --prefix=$PWD --target-list=x86_64-softmmu
|
||||
make virtiofsd tests/vhost-user-bridge vhost-user-blk -j `nproc`
|
||||
make virtiofsd vhost-user-blk -j `nproc`
|
||||
cp virtiofsd $VIRTIOFSD
|
||||
cp tests/vhost-user-bridge $VUBRIDGE
|
||||
cp vhost-user-blk $VUBD
|
||||
popd
|
||||
rm -rf $QEMU_DIR
|
||||
@@ -141,6 +139,7 @@ sudo ip link set vfio-tap1 up
|
||||
|
||||
cargo build
|
||||
sudo setcap cap_net_admin+ep target/debug/cloud-hypervisor
|
||||
sudo setcap cap_net_admin+ep target/debug/vhost_user_net
|
||||
|
||||
# We always copy a fresh version of our binary for our L2 guest.
|
||||
cp target/debug/cloud-hypervisor $VFIO_DIR
|
||||
|
||||
Reference in New Issue
Block a user