Skip to content

Commit

Permalink
tests: Reduce Guest memory in _test_snapshot_restore
Browse files Browse the repository at this point in the history
Change from 4G to 2G to reduce the memory usage. This will help avoid
"No disk space left" errors when all snapshot tests run at once.

Signed-off-by: Purna Pavan Chandra <[email protected]>
  • Loading branch information
pupacha committed Apr 25, 2024
1 parent e04b41a commit ced133a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6049,10 +6049,10 @@ mod common_parallel {
)
};

let mut mem_params = "size=4G";
let mut mem_params = "size=2G";

if use_hotplug {
mem_params = "size=4G,hotplug_method=virtio-mem,hotplug_size=32G"
mem_params = "size=2G,hotplug_method=virtio-mem,hotplug_size=32G"
}

let cloudinit_params = format!(
Expand Down Expand Up @@ -6103,7 +6103,7 @@ mod common_parallel {
// Check the number of vCPUs
assert_eq!(guest.get_cpu_count().unwrap_or_default(), 4);
// Check the guest RAM
assert!(guest.get_total_memory().unwrap_or_default() > 3_840_000);
assert!(guest.get_total_memory().unwrap_or_default() > 1_920_000);
if use_hotplug {
// Increase guest RAM with virtio-mem
resize_command(
Expand Down Expand Up @@ -6377,7 +6377,7 @@ mod common_parallel {
assert_eq!(guest.get_cpu_count().unwrap_or_default(), 4);
let total_memory = guest.get_total_memory().unwrap_or_default();
if !use_hotplug {
assert!(guest.get_total_memory().unwrap_or_default() > 3_840_000);
assert!(guest.get_total_memory().unwrap_or_default() > 1_920_000);
} else {
assert!(total_memory > 4_800_000);
assert!(total_memory < 5_760_000);
Expand Down

0 comments on commit ced133a

Please sign in to comment.