mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-09-28 17:45:44 +00:00
tests: live_migration: Run most tests in parallel
Only the ovs-dpdk live-migration tests need to run sequentially as they use the same ovs-dpdk setup. This is to reduce our CI time, particularly for the live-migration and aarch64 jobs. Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
1f70d16c12
commit
8f3462b3e3
@ -272,7 +272,14 @@ fi
|
|||||||
|
|
||||||
# Run all test cases related to live migration
|
# Run all test cases related to live migration
|
||||||
if [ $RES -eq 0 ]; then
|
if [ $RES -eq 0 ]; then
|
||||||
time cargo test $features "live_migration::$test_filter" --target $BUILD_TARGET -- --test-threads=1 ${test_binary_args[*]}
|
time cargo test $features "live_migration_parallel::$test_filter" --target $BUILD_TARGET -- ${test_binary_args[*]}
|
||||||
|
RES=$?
|
||||||
|
else
|
||||||
|
exit $RES
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $RES -eq 0 ]; then
|
||||||
|
time cargo test $features "live_migration_sequential::$test_filter" --target $BUILD_TARGET -- --test-threads=1 ${test_binary_args[*]}
|
||||||
RES=$?
|
RES=$?
|
||||||
else
|
else
|
||||||
exit $RES
|
exit $RES
|
||||||
|
@ -96,7 +96,15 @@ echo 6144 | sudo tee /proc/sys/vm/nr_hugepages
|
|||||||
sudo chmod a+rwX /dev/hugepages
|
sudo chmod a+rwX /dev/hugepages
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
time cargo test $features "live_migration::$test_filter" -- --test-threads=1 ${test_binary_args[*]}
|
time cargo test $features "live_migration_parallel::$test_filter" -- ${test_binary_args[*]}
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
|
# Run some tests in sequence since the result could be affected by other tests
|
||||||
|
# running in parallel.
|
||||||
|
if [ $RES -eq 0 ]; then
|
||||||
|
export RUST_BACKTRACE=1
|
||||||
|
time cargo test $features "live_migration_sequential::$test_filter" -- --test-threads=1 ${test_binary_args[*]}
|
||||||
|
RES=$?
|
||||||
|
fi
|
||||||
|
|
||||||
exit $RES
|
exit $RES
|
||||||
|
@ -8680,98 +8680,6 @@ mod live_migration {
|
|||||||
handle_child_output(r, &dest_output);
|
handle_child_output(r, &dest_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_live_migration_basic() {
|
|
||||||
_test_live_migration(false, false, false, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_live_migration_local() {
|
|
||||||
_test_live_migration(false, false, true, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[cfg(not(feature = "mshv"))]
|
|
||||||
fn test_live_migration_numa() {
|
|
||||||
_test_live_migration(false, true, false, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[cfg(not(feature = "mshv"))]
|
|
||||||
fn test_live_migration_numa_local() {
|
|
||||||
_test_live_migration(false, true, true, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_live_migration_watchdog() {
|
|
||||||
_test_live_migration(false, false, false, true, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_live_migration_watchdog_local() {
|
|
||||||
_test_live_migration(false, false, true, true, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_live_migration_balloon() {
|
|
||||||
_test_live_migration(false, false, false, false, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_live_migration_balloon_local() {
|
|
||||||
_test_live_migration(false, false, true, false, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn test_live_upgrade_basic() {
|
|
||||||
_test_live_migration(true, false, false, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn test_live_upgrade_local() {
|
|
||||||
_test_live_migration(true, false, true, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
#[cfg(not(feature = "mshv"))]
|
|
||||||
fn test_live_upgrade_numa() {
|
|
||||||
_test_live_migration(true, true, false, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
#[cfg(not(feature = "mshv"))]
|
|
||||||
fn test_live_upgrade_numa_local() {
|
|
||||||
_test_live_migration(true, true, true, false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn test_live_upgrade_watchdog() {
|
|
||||||
_test_live_migration(true, false, false, true, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn test_live_upgrade_watchdog_local() {
|
|
||||||
_test_live_migration(true, false, true, true, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn test_live_upgrade_balloon() {
|
|
||||||
_test_live_migration(true, false, false, false, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn test_live_upgrade_balloon_local() {
|
|
||||||
_test_live_migration(true, false, true, false, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn _test_live_migration_ovs_dpdk(upgrade_test: bool, local: bool) {
|
fn _test_live_migration_ovs_dpdk(upgrade_test: bool, local: bool) {
|
||||||
let ovs_focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let ovs_focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||||
let ovs_guest = Guest::new(Box::new(ovs_focal));
|
let ovs_guest = Guest::new(Box::new(ovs_focal));
|
||||||
@ -8974,6 +8882,106 @@ mod live_migration {
|
|||||||
cleanup_ovs_dpdk();
|
cleanup_ovs_dpdk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod live_migration_parallel {
|
||||||
|
use super::*;
|
||||||
|
#[test]
|
||||||
|
fn test_live_migration_basic() {
|
||||||
|
_test_live_migration(false, false, false, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_live_migration_local() {
|
||||||
|
_test_live_migration(false, false, true, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(not(feature = "mshv"))]
|
||||||
|
fn test_live_migration_numa() {
|
||||||
|
_test_live_migration(false, true, false, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(not(feature = "mshv"))]
|
||||||
|
fn test_live_migration_numa_local() {
|
||||||
|
_test_live_migration(false, true, true, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_live_migration_watchdog() {
|
||||||
|
_test_live_migration(false, false, false, true, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_live_migration_watchdog_local() {
|
||||||
|
_test_live_migration(false, false, true, true, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_live_migration_balloon() {
|
||||||
|
_test_live_migration(false, false, false, false, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_live_migration_balloon_local() {
|
||||||
|
_test_live_migration(false, false, true, false, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
fn test_live_upgrade_basic() {
|
||||||
|
_test_live_migration(true, false, false, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
fn test_live_upgrade_local() {
|
||||||
|
_test_live_migration(true, false, true, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
#[cfg(not(feature = "mshv"))]
|
||||||
|
fn test_live_upgrade_numa() {
|
||||||
|
_test_live_migration(true, true, false, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
#[cfg(not(feature = "mshv"))]
|
||||||
|
fn test_live_upgrade_numa_local() {
|
||||||
|
_test_live_migration(true, true, true, false, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
fn test_live_upgrade_watchdog() {
|
||||||
|
_test_live_migration(true, false, false, true, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
fn test_live_upgrade_watchdog_local() {
|
||||||
|
_test_live_migration(true, false, true, true, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
fn test_live_upgrade_balloon() {
|
||||||
|
_test_live_migration(true, false, false, false, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore]
|
||||||
|
fn test_live_upgrade_balloon_local() {
|
||||||
|
_test_live_migration(true, false, true, false, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mod live_migration_sequential {
|
||||||
|
#[cfg(not(feature = "mshv"))]
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
// Require to run ovs-dpdk tests sequentially because they rely on the same ovs-dpdk setup
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(feature = "mshv"))]
|
#[cfg(not(feature = "mshv"))]
|
||||||
fn test_live_migration_ovs_dpdk() {
|
fn test_live_migration_ovs_dpdk() {
|
||||||
@ -9000,6 +9008,7 @@ mod live_migration {
|
|||||||
_test_live_migration_ovs_dpdk(true, true);
|
_test_live_migration_ovs_dpdk(true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
mod aarch64_acpi {
|
mod aarch64_acpi {
|
||||||
|
Loading…
Reference in New Issue
Block a user