Skip to content

Commit c333311

Browse files
Merge branch 'main' into nvmeUpdateLogType
2 parents 11013ae + b6a1156 commit c333311

File tree

121 files changed

+5954
-2400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+5954
-2400
lines changed

.config/nextest.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,13 @@ store-success-output = "true"
4040
filter = 'test(loom)'
4141
slow-timeout = { period = "30s", terminate-after = 2 }
4242

43-
# Reboot VMM tests take extra long
44-
[[profile.ci.overrides]]
45-
filter = 'package(~vmm_tests) & test(reboot)'
46-
slow-timeout = { period = "5m", terminate-after = 2 }
47-
4843
[[profile.ci.overrides]]
4944
# use fuzzy-matching for the package() to allow out-of-tree tests to use the
5045
# same profile
5146
filter = 'package(~vmm_tests)'
52-
# Allow VMM tests longer timeouts.
53-
# Important Note: Petri's watchdogs need to know this value too.
54-
# If you change it here then change it there!
55-
slow-timeout = { period = "3m", terminate-after = 2 }
47+
# VMM tests contain their own watchdog timer, but keep an extra long timer
48+
# here as a backup.
49+
slow-timeout = { period = "10m", terminate-after = 1 }
5650

5751
# TEMP (hopefully): For reasons that continue to befuddle, running Windows
5852
# release-mode unit tests in flowey CI is resulting in seemingly-random

.github/workflows/openvmm-ci.yaml

Lines changed: 121 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/openvmm-pr-release.yaml

Lines changed: 121 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/openvmm-pr.yaml

Lines changed: 121 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.lock

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5560,6 +5560,7 @@ dependencies = [
55605560
"get_resources",
55615561
"gptman",
55625562
"guid",
5563+
"hvdef",
55635564
"hvlite_defs",
55645565
"hvlite_helpers",
55655566
"hvlite_pcat_locator",
@@ -5588,6 +5589,7 @@ dependencies = [
55885589
"pipette_client",
55895590
"powershell_builder",
55905591
"prost",
5592+
"safe_intrinsics",
55915593
"scsidisk_resources",
55925594
"serde",
55935595
"serde_json",
@@ -5617,6 +5619,7 @@ dependencies = [
56175619
"vmsocket",
56185620
"vtl2_settings_proto",
56195621
"windows-version",
5622+
"x86defs",
56205623
]
56215624

56225625
[[package]]
@@ -5861,6 +5864,25 @@ dependencies = [
58615864
"zerocopy 0.8.25",
58625865
]
58635866

5867+
[[package]]
5868+
name = "prep_steps"
5869+
version = "0.0.0"
5870+
dependencies = [
5871+
"anyhow",
5872+
"guid",
5873+
"hvlite_defs",
5874+
"hvlite_helpers",
5875+
"pal_async",
5876+
"petri",
5877+
"petri_artifact_resolver_openvmm_known_paths",
5878+
"petri_artifacts_common",
5879+
"petri_artifacts_vmm_test",
5880+
"scsidisk_resources",
5881+
"storvsp_resources",
5882+
"tracing",
5883+
"vm_resource",
5884+
]
5885+
58645886
[[package]]
58655887
name = "prettyplease"
58665888
version = "0.1.25"
@@ -9136,6 +9158,7 @@ dependencies = [
91369158
"disk_backend",
91379159
"disk_vhd1",
91389160
"fs-err",
9161+
"getrandom 0.3.3",
91399162
"guid",
91409163
"hcl_compat_uefi_nvram_storage",
91419164
"hex",
@@ -9243,12 +9266,10 @@ name = "vmm_tests"
92439266
version = "0.0.0"
92449267
dependencies = [
92459268
"anyhow",
9246-
"cfg-if",
92479269
"disk_backend_resources",
92489270
"futures",
92499271
"get_resources",
92509272
"guid",
9251-
"hvdef",
92529273
"hvlite_defs",
92539274
"hvlite_ttrpc_vmservice",
92549275
"hyperv_ic_resources",
@@ -9266,7 +9287,6 @@ dependencies = [
92669287
"petri_artifact_resolver_openvmm_known_paths",
92679288
"petri_artifacts_common",
92689289
"petri_artifacts_vmm_test",
9269-
"safe_intrinsics",
92709290
"scsidisk_resources",
92719291
"storvsp_resources",
92729292
"tempfile",
@@ -9276,8 +9296,6 @@ dependencies = [
92769296
"virtio_resources",
92779297
"vm_resource",
92789298
"vmm_test_macros",
9279-
"vtl2_settings_proto",
9280-
"x86defs",
92819299
"zerocopy 0.8.25",
92829300
]
92839301

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ members = [
2020
"tmk/tmk_vmm",
2121
"tmk/simple_tmk",
2222
# VMM tests
23+
"vmm_tests/prep_steps",
2324
"vmm_tests/vmm_tests",
2425
# hyper-v tooling
2526
"hyperv/tools/hypestv",

flowey/flowey_hvlite/src/pipelines/checkin_gates.rs

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ impl IntoPipeline for CheckinGatesCli {
252252
let (pub_tmk_vmm, use_tmk_vmm) =
253253
pipeline.new_typed_artifact(format!("{arch_tag}-windows-tmk_vmm"));
254254

255+
let (pub_prep_steps, use_prep_steps) =
256+
pipeline.new_typed_artifact(format!("{arch_tag}-windows-prep_steps"));
257+
258+
let (pub_vmgstool, use_vmgstool) =
259+
pipeline.new_typed_artifact(format!("{arch_tag}-windows-vmgstool"));
260+
255261
// filter off interesting artifacts required by the VMM tests job
256262
match arch {
257263
CommonArch::X86_64 => {
@@ -261,6 +267,8 @@ impl IntoPipeline for CheckinGatesCli {
261267
vmm_tests_artifacts_windows_x86.use_pipette_windows =
262268
Some(use_pipette_windows.clone());
263269
vmm_tests_artifacts_windows_x86.use_tmk_vmm = Some(use_tmk_vmm.clone());
270+
vmm_tests_artifacts_windows_x86.use_prep_steps = Some(use_prep_steps.clone());
271+
vmm_tests_artifacts_windows_x86.use_vmgstool = Some(use_vmgstool.clone());
264272
}
265273
CommonArch::Aarch64 => {
266274
vmm_tests_artifacts_windows_aarch64.use_openvmm = Some(use_openvmm.clone());
@@ -276,8 +284,6 @@ impl IntoPipeline for CheckinGatesCli {
276284
pipeline.new_typed_artifact(format!("{arch_tag}-windows-igvmfilegen"));
277285
let (pub_vmgs_lib, _use_vmgs_lib) =
278286
pipeline.new_typed_artifact(format!("{arch_tag}-windows-vmgs_lib"));
279-
let (pub_vmgstool, _use_vmgstool) =
280-
pipeline.new_typed_artifact(format!("{arch_tag}-windows-vmgstool"));
281287
let (pub_hypestv, _use_hypestv) =
282288
pipeline.new_typed_artifact(format!("{arch_tag}-windows-hypestv"));
283289
let (pub_ohcldiag_dev, _use_ohcldiag_dev) =
@@ -292,15 +298,6 @@ impl IntoPipeline for CheckinGatesCli {
292298
.gh_set_pool(crate::pipelines_shared::gh_pools::default_x86_pool(
293299
FlowPlatform::Windows,
294300
))
295-
.dep_on(|ctx| flowey_lib_hvlite::build_vmgstool::Request {
296-
target: CommonTriple::Common {
297-
arch,
298-
platform: CommonPlatform::WindowsMsvc,
299-
},
300-
profile: CommonProfile::from_release(release),
301-
with_crypto: true,
302-
vmgstool: ctx.publish_typed_artifact(pub_vmgstool),
303-
})
304301
.dep_on(|ctx| flowey_lib_hvlite::build_hypestv::Request {
305302
target: CommonTriple::Common {
306303
arch,
@@ -384,6 +381,23 @@ impl IntoPipeline for CheckinGatesCli {
384381
unstable_whp: true, // The ARM64 CI runner supports the unstable WHP interface
385382
profile: CommonProfile::from_release(release),
386383
tmk_vmm: ctx.publish_typed_artifact(pub_tmk_vmm),
384+
})
385+
.dep_on(|ctx| flowey_lib_hvlite::build_prep_steps::Request {
386+
target: CommonTriple::Common {
387+
arch,
388+
platform: CommonPlatform::WindowsMsvc,
389+
},
390+
profile: CommonProfile::from_release(release),
391+
prep_steps: ctx.publish_typed_artifact(pub_prep_steps),
392+
})
393+
.dep_on(|ctx| flowey_lib_hvlite::build_vmgstool::Request {
394+
target: CommonTriple::Common {
395+
arch,
396+
platform: CommonPlatform::WindowsMsvc,
397+
},
398+
profile: CommonProfile::from_release(release),
399+
with_crypto: true,
400+
vmgstool: ctx.publish_typed_artifact(pub_vmgstool),
387401
});
388402

389403
// Hang building the windows VMM tests off this big windows job.
@@ -884,13 +898,13 @@ impl IntoPipeline for CheckinGatesCli {
884898
resolve_vmm_tests_artifacts: vmm_tests_artifact_builders::ResolveVmmTestsDepArtifacts,
885899
nextest_filter_expr: String,
886900
test_artifacts: Vec<KnownTestArtifacts>,
901+
needs_prep_run: bool,
887902
}
888903

889904
// standard VM-based CI machines should be able to run all tests except
890905
// those that require special hardware features (tdx/snp) or need to be
891906
// run on a baremetal host (hyper-v vbs doesn't seem to work nested)
892-
let standard_filter =
893-
"all() & !test(tdx) & !test(snp) & !(test(vbs) & test(hyperv))".to_string();
907+
let standard_filter = "all()".to_string();
894908
let standard_x64_test_artifacts = vec![
895909
KnownTestArtifacts::FreeBsd13_2X64Vhd,
896910
KnownTestArtifacts::FreeBsd13_2X64Iso,
@@ -902,6 +916,7 @@ impl IntoPipeline for CheckinGatesCli {
902916

903917
let cvm_filter = |arch| format!("test({arch}) + (test(vbs) & test(hyperv))");
904918
let cvm_x64_test_artifacts = vec![
919+
KnownTestArtifacts::Gen2WindowsDataCenterCore2022X64Vhd,
905920
KnownTestArtifacts::Gen2WindowsDataCenterCore2025X64Vhd,
906921
KnownTestArtifacts::Ubuntu2404ServerX64Vhd,
907922
];
@@ -915,6 +930,7 @@ impl IntoPipeline for CheckinGatesCli {
915930
resolve_vmm_tests_artifacts,
916931
nextest_filter_expr,
917932
test_artifacts,
933+
needs_prep_run,
918934
} in [
919935
VmmTestJobParams {
920936
platform: FlowPlatform::Windows,
@@ -925,6 +941,7 @@ impl IntoPipeline for CheckinGatesCli {
925941
resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_intel_x86,
926942
nextest_filter_expr: standard_filter.clone(),
927943
test_artifacts: standard_x64_test_artifacts.clone(),
944+
needs_prep_run: false,
928945
},
929946
VmmTestJobParams {
930947
platform: FlowPlatform::Windows,
@@ -935,6 +952,7 @@ impl IntoPipeline for CheckinGatesCli {
935952
resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_intel_tdx_x86,
936953
nextest_filter_expr: cvm_filter("tdx"),
937954
test_artifacts: cvm_x64_test_artifacts.clone(),
955+
needs_prep_run: true,
938956
},
939957
VmmTestJobParams {
940958
platform: FlowPlatform::Windows,
@@ -945,6 +963,7 @@ impl IntoPipeline for CheckinGatesCli {
945963
resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_amd_x86,
946964
nextest_filter_expr: standard_filter.clone(),
947965
test_artifacts: standard_x64_test_artifacts.clone(),
966+
needs_prep_run: false,
948967
},
949968
VmmTestJobParams {
950969
platform: FlowPlatform::Windows,
@@ -955,6 +974,7 @@ impl IntoPipeline for CheckinGatesCli {
955974
resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_amd_snp_x86,
956975
nextest_filter_expr: cvm_filter("snp"),
957976
test_artifacts: cvm_x64_test_artifacts,
977+
needs_prep_run: true,
958978
},
959979
VmmTestJobParams {
960980
platform: FlowPlatform::Linux(FlowPlatformLinuxDistro::Ubuntu),
@@ -966,6 +986,7 @@ impl IntoPipeline for CheckinGatesCli {
966986
// - No legal way to obtain gen1 pcat blobs on non-msft linux machines
967987
nextest_filter_expr: format!("{standard_filter} & !test(pcat_x64)"),
968988
test_artifacts: standard_x64_test_artifacts,
989+
needs_prep_run: false,
969990
},
970991
VmmTestJobParams {
971992
platform: FlowPlatform::Windows,
@@ -980,6 +1001,7 @@ impl IntoPipeline for CheckinGatesCli {
9801001
KnownTestArtifacts::Windows11EnterpriseAarch64Vhdx,
9811002
KnownTestArtifacts::VmgsWithBootEntry,
9821003
],
1004+
needs_prep_run: false,
9831005
},
9841006
] {
9851007
let test_label = format!("{label}-vmm-tests");
@@ -1012,6 +1034,7 @@ impl IntoPipeline for CheckinGatesCli {
10121034
test_artifacts,
10131035
fail_job_on_test_fail: true,
10141036
artifact_dir: pub_vmm_tests_results.map(|x| ctx.publish_artifact(x)),
1037+
needs_prep_run,
10151038
done: ctx.new_done_handle(),
10161039
}
10171040
});
@@ -1096,8 +1119,10 @@ mod vmm_tests_artifact_builders {
10961119
use flowey_lib_hvlite::build_guest_test_uefi::GuestTestUefiOutput;
10971120
use flowey_lib_hvlite::build_openvmm::OpenvmmOutput;
10981121
use flowey_lib_hvlite::build_pipette::PipetteOutput;
1122+
use flowey_lib_hvlite::build_prep_steps::PrepStepsOutput;
10991123
use flowey_lib_hvlite::build_tmk_vmm::TmkVmmOutput;
11001124
use flowey_lib_hvlite::build_tmks::TmksOutput;
1125+
use flowey_lib_hvlite::build_vmgstool::VmgstoolOutput;
11011126

11021127
pub type ResolveVmmTestsDepArtifacts =
11031128
Box<dyn Fn(&mut PipelineJobCtx<'_>) -> VmmTestsDepArtifacts>;
@@ -1143,6 +1168,8 @@ mod vmm_tests_artifact_builders {
11431168
// not currently required, since OpenHCL tests cannot be run on OpenVMM on linux
11441169
artifact_dir_openhcl_igvm_files: None,
11451170
tmk_vmm_linux_musl: None,
1171+
prep_steps: None,
1172+
vmgstool: None,
11461173
}))
11471174
}
11481175
}
@@ -1153,6 +1180,8 @@ mod vmm_tests_artifact_builders {
11531180
pub use_openvmm: Option<UseTypedArtifact<OpenvmmOutput>>,
11541181
pub use_pipette_windows: Option<UseTypedArtifact<PipetteOutput>>,
11551182
pub use_tmk_vmm: Option<UseTypedArtifact<TmkVmmOutput>>,
1183+
pub use_prep_steps: Option<UseTypedArtifact<PrepStepsOutput>>,
1184+
pub use_vmgstool: Option<UseTypedArtifact<VmgstoolOutput>>,
11561185
// linux build machine
11571186
pub use_openhcl_igvm_files: Option<UseArtifact>,
11581187
pub use_pipette_linux_musl: Option<UseTypedArtifact<PipetteOutput>>,
@@ -1173,6 +1202,8 @@ mod vmm_tests_artifact_builders {
11731202
use_tmk_vmm,
11741203
use_tmk_vmm_linux_musl,
11751204
use_tmks,
1205+
use_prep_steps,
1206+
use_vmgstool,
11761207
} = self;
11771208

11781209
let use_openvmm = use_openvmm.ok_or("openvmm")?;
@@ -1183,6 +1214,8 @@ mod vmm_tests_artifact_builders {
11831214
let use_tmk_vmm = use_tmk_vmm.ok_or("tmk_vmm")?;
11841215
let use_tmk_vmm_linux_musl = use_tmk_vmm_linux_musl.ok_or("tmk_vmm_linux_musl")?;
11851216
let use_tmks = use_tmks.ok_or("tmks")?;
1217+
let use_prep_steps = use_prep_steps.ok_or("prep_steps")?;
1218+
let use_vmgstool = use_vmgstool.ok_or("vmgstool")?;
11861219

11871220
Ok(Box::new(move |ctx| VmmTestsDepArtifacts {
11881221
openvmm: Some(ctx.use_typed_artifact(&use_openvmm)),
@@ -1193,6 +1226,8 @@ mod vmm_tests_artifact_builders {
11931226
tmk_vmm: Some(ctx.use_typed_artifact(&use_tmk_vmm)),
11941227
tmk_vmm_linux_musl: Some(ctx.use_typed_artifact(&use_tmk_vmm_linux_musl)),
11951228
tmks: Some(ctx.use_typed_artifact(&use_tmks)),
1229+
prep_steps: Some(ctx.use_typed_artifact(&use_prep_steps)),
1230+
vmgstool: Some(ctx.use_typed_artifact(&use_vmgstool)),
11961231
}))
11971232
}
11981233
}
@@ -1243,6 +1278,8 @@ mod vmm_tests_artifact_builders {
12431278
tmk_vmm: Some(ctx.use_typed_artifact(&use_tmk_vmm)),
12441279
tmk_vmm_linux_musl: Some(ctx.use_typed_artifact(&use_tmk_vmm_linux_musl)),
12451280
tmks: Some(ctx.use_typed_artifact(&use_tmks)),
1281+
prep_steps: None,
1282+
vmgstool: None,
12461283
}))
12471284
}
12481285
}

flowey/flowey_hvlite/src/pipelines/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub mod restore_packages;
1313
pub mod vmm_tests;
1414

1515
#[derive(clap::Subcommand)]
16-
#[expect(clippy::large_enum_variant)]
16+
#[cfg_attr(windows, expect(clippy::large_enum_variant))]
1717
pub enum OpenvmmPipelines {
1818
/// Alias for root-level `regen` command.
1919
// DEVNOTE: this enables the useful `cargo xflowey regen` alias

flowey/flowey_hvlite/src/pipelines/vmm_tests.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ pub struct VmmTestsCli {
7070
/// Copy extras to output dir (symbols, etc)
7171
#[clap(long)]
7272
copy_extras: bool,
73+
74+
/// Optional: custom kernel modules
75+
#[clap(long)]
76+
custom_kernel_modules: Option<PathBuf>,
77+
/// Optional: custom kernel image
78+
#[clap(long)]
79+
custom_kernel: Option<PathBuf>,
7380
}
7481

7582
impl IntoPipeline for VmmTestsCli {
@@ -90,6 +97,8 @@ impl IntoPipeline for VmmTestsCli {
9097
release,
9198
build_only,
9299
copy_extras,
100+
custom_kernel_modules,
101+
custom_kernel,
93102
} = self;
94103

95104
let openvmm_repo = flowey_lib_common::git_checkout::RepoSource::ExistingClone(
@@ -185,6 +194,8 @@ impl IntoPipeline for VmmTestsCli {
185194
release,
186195
build_only,
187196
copy_extras,
197+
custom_kernel_modules,
198+
custom_kernel,
188199
done: ctx.new_done_handle(),
189200
},
190201
)

flowey/flowey_lib_common/src/gh_latest_completed_workflow_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl SimpleFlowNode for Node {
4646

4747
let id = xshell::cmd!(
4848
sh,
49-
"{gh_cli} run list -R {repo} -b {branch} -w {pipeline_name} -s completed --limit 1 --json databaseId -q .[0].databaseId"
49+
"{gh_cli} run list -R {repo} -b {branch} -w {pipeline_name} -s success --limit 1 --json databaseId -q .[0].databaseId"
5050
)
5151
.read()?;
5252

0 commit comments

Comments
 (0)