ci: Make the integration test binary run with same caps

By giving the same caps to both cloud-hypervisor and the test binary, we
can access information under /proc related to the VM PID.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2019-11-21 17:35:44 +00:00
parent ac118c9924
commit 3d6b5459ef

View File

@ -158,6 +158,10 @@ sudo bash -c "echo 10000 > /sys/kernel/mm/ksm/pages_to_scan"
sudo bash -c "echo 10 > /sys/kernel/mm/ksm/sleep_millisecs"
sudo bash -c "echo 1 > /sys/kernel/mm/ksm/run"
# Ensure test binary has the same caps as the cloud-hypervisor one
cargo test --no-run --features "integration_tests" -- --nocapture
sudo setcap cap_net_admin+ep target/debug/deps/cloud_hypervisor-*
sudo adduser $USER kvm
newgrp kvm << EOF
export RUST_BACKTRACE=1