Skip to content

Commit 3157dfb

Browse files
vmm_tests: enabling GP x64 memory validation tests (#2114)
Description: Updating the GP x64 baseline numbers to account for internal repository overhead, and enabling these tests for the pipeline. Changes: - Modified baseline values for GP x64 memory validation from hvlite data collection - Enabling GP x64 memory validation tests - Adding threshold for kernel reservation
1 parent 234fae8 commit 3157dfb

File tree

3 files changed

+45
-34
lines changed

3 files changed

+45
-34
lines changed

vmm_tests/vmm_tests/test_data/memstat_baseline.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"threshold": 1024
88
},
99
"reservation": {
10-
"base": 18360,
11-
"threshold": 0
10+
"base": 18440,
11+
"threshold": 512
1212
},
1313
"underhill_init": {
1414
"Pss": {
@@ -47,8 +47,8 @@
4747
"threshold": 3072
4848
},
4949
"reservation": {
50-
"base": 23884,
51-
"threshold": 0
50+
"base": 23964,
51+
"threshold": 512
5252
},
5353
"underhill_init": {
5454
"Pss": {
@@ -86,12 +86,12 @@
8686
"vtl2_total": 524288,
8787
"2vp": {
8888
"usage": {
89-
"base": 231334,
89+
"base": 232418,
9090
"threshold": 1024
9191
},
9292
"reservation": {
93-
"base": 17664,
94-
"threshold": 0
93+
"base": 17668,
94+
"threshold": 512
9595
},
9696
"underhill_init": {
9797
"Pss": {
@@ -105,7 +105,7 @@
105105
},
106106
"openvmm_hcl": {
107107
"Pss": {
108-
"base": 15097,
108+
"base": 16541,
109109
"threshold": 512
110110
},
111111
"Pss_Anon": {
@@ -115,7 +115,7 @@
115115
},
116116
"underhill_vm": {
117117
"Pss": {
118-
"base": 29054,
118+
"base": 32801,
119119
"threshold": 1024
120120
},
121121
"Pss_Anon": {
@@ -126,12 +126,12 @@
126126
},
127127
"32vp": {
128128
"usage": {
129-
"base": 254748,
129+
"base": 255386,
130130
"threshold": 3072
131131
},
132132
"reservation": {
133-
"base": 24664,
134-
"threshold": 0
133+
"base": 24668,
134+
"threshold": 512
135135
},
136136
"underhill_init": {
137137
"Pss": {
@@ -145,7 +145,7 @@
145145
},
146146
"openvmm_hcl": {
147147
"Pss": {
148-
"base": 15170,
148+
"base": 16116,
149149
"threshold": 512
150150
},
151151
"Pss_Anon": {
@@ -155,7 +155,7 @@
155155
},
156156
"underhill_vm": {
157157
"Pss": {
158-
"base": 37262,
158+
"base": 41883,
159159
"threshold": 3072
160160
},
161161
"Pss_Anon": {
@@ -173,8 +173,8 @@
173173
"threshold": 1024
174174
},
175175
"reservation": {
176-
"base": 28952,
177-
"threshold": 0
176+
"base": 29036,
177+
"threshold": 512
178178
},
179179
"underhill_init": {
180180
"Pss": {
@@ -213,8 +213,8 @@
213213
"threshold": 3072
214214
},
215215
"reservation": {
216-
"base": 41676,
217-
"threshold": 0
216+
"base": 41764,
217+
"threshold": 512
218218
},
219219
"underhill_init": {
220220
"Pss": {
@@ -256,8 +256,8 @@
256256
"threshold": 1024
257257
},
258258
"reservation": {
259-
"base": 28884,
260-
"threshold": 0
259+
"base": 28972,
260+
"threshold": 512
261261
},
262262
"underhill_init": {
263263
"Pss": {
@@ -296,8 +296,8 @@
296296
"threshold": 3072
297297
},
298298
"reservation": {
299-
"base": 42356,
300-
"threshold": 0
299+
"base": 42440,
300+
"threshold": 512
301301
},
302302
"underhill_init": {
303303
"Pss": {

vmm_tests/vmm_tests/tests/tests/multiarch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ async fn guest_test_uefi<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyho
476476
}
477477

478478
#[vmm_test(
479-
// hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)),
479+
hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)),
480480
hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64))
481481
)]
482482
#[cfg_attr(not(windows), expect(dead_code))]
@@ -517,7 +517,7 @@ async fn memory_validation_cvm_small<T: PetriVmmBackend>(
517517
}
518518

519519
#[vmm_test(
520-
// hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)),
520+
hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)),
521521
hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64))
522522
)]
523523
#[cfg_attr(not(windows), expect(dead_code))]

vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use std::ops::IndexMut;
2323
use std::time::Duration;
2424

2525
#[repr(u32)]
26+
#[derive(PartialEq)]
2627
pub enum TestVPCount {
2728
SmallVPCount,
2829
LargeVPCount,
@@ -197,7 +198,8 @@ impl MemStat {
197198
/// For all 2VP tests general usage and underhill_vm process memory usage are given a 1MiB threshold
198199
/// For all large (32VP or 64VP) tests general usage and underhill_vm process memory usage are given a 3MiB threshold
199200
/// All other processes have a usage threshold of 512kB
200-
/// Kernel reservation has a threshold of 0 since there is no run-to-run variance with that statistic
201+
/// Kernel reservation has a threshold of 512kB
202+
/// In case any of these thresholds are exceeded, it would be considered a significant increase in memory usage from the previously established baseline (beyond run variance)
201203
fn compare_to_baseline(self, arch: &str, vps: &str) -> anyhow::Result<()> {
202204
let baseline_usage = Self::get_upper_limit_value(&self.baseline_json[arch][vps]["usage"]);
203205
let cur_usage = self.meminfo["MemTotal"] - self.total_free_memory_per_zone;
@@ -235,13 +237,6 @@ impl MemStat {
235237
);
236238
}
237239

238-
/*
239-
Note on reservation test:
240-
- Kernel reservation does not experience run-to-run variance and is not expected to change frequently
241-
- Therefore the threshold for kernel reservation is 0
242-
- If a code change must increase the kernel reservation, then the "base" value for the "reservation" statistic can be updated in memstat_baseline.json
243-
- Occasional increases in the kernel reservation are expected, but should be noted in such an event
244-
*/
245240
let baseline_reservation =
246241
Self::get_upper_limit_value(&self.baseline_json[arch][vps]["reservation"]);
247242
let cur_reservation =
@@ -388,7 +383,7 @@ pub(crate) async fn idle_test<T: PetriVmmBackend>(
388383
}
389384
}
390385
};
391-
let (mut vm, agent) = config
386+
let vm_boot_result = config
392387
.with_processor_topology({
393388
ProcessorTopology {
394389
vp_count,
@@ -402,7 +397,23 @@ pub(crate) async fn idle_test<T: PetriVmmBackend>(
402397
}
403398
})
404399
.run()
405-
.await?;
400+
.await;
401+
402+
// The VM is expected to fail to boot on the internal Intel pipeline only for the large VM size. We still want the AMD test to execute so
403+
// we will keep the test and gracefully exit in case of a failure. Any other type of boot failure should still produce an error
404+
if vm_boot_result.is_err()
405+
&& machine_arch == MachineArch::X86_64
406+
&& isolation_type.is_none()
407+
&& vps == TestVPCount::LargeVPCount
408+
{
409+
tracing::warn!(
410+
"VM failed to start with the given topology, this is expected for the internal Intel runner only"
411+
);
412+
return Ok(());
413+
}
414+
415+
let (mut vm, agent) = vm_boot_result?;
416+
406417
let vtl2_agent = vm.wait_for_vtl2_agent().await?;
407418

408419
// Wait for the guest to be booted

0 commit comments

Comments
 (0)