From 19525a0b11445f8efe0c9ff4813c284ad5e68f9e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 3 Oct 2026 04:49:51 -0400 Subject: [PATCH 1/2] xtask/tmt: Generate one fmf file per test and per plan The generated tests all lived in tmt/tests/tests.fmf and the plans in a block of tmt/plans/integration.fmf. Every pull request adding a test therefore touched the same two files, next to each other in a sorted list, so they conflict whenever two are open at once. Generate tmt/tests/tests/test-*.fmf and tmt/plans/integration/plan-*.fmf instead, one each. fmf merges the directory into the node of the same name, so tests.fmf and integration.fmf stay as the hand-written places for the settings common to all tests and plans, and the test and plan names (and so what `just test-tmt FILTER` selects) are unchanged; `tmt plan export` and `tmt test export` are identical before and after, modulo the file list. The tests need an explicit `path` now, since by default it follows the directory of the file defining them. `update-generated` also removes files of tests that went away, and the check fails on stale ones. Prep for dropping the test numbers from the names. Generated-by: AI Signed-off-by: Colin Walters --- crates/xtask/src/tmt.rs | 398 +++++++----------- tmt/plans/integration.fmf | 328 +-------------- tmt/plans/integration/plan-01-readonly.fmf | 9 + .../plan-20-image-pushpull-upgrade.fmf | 8 + .../plan-21-logically-bound-switch.fmf | 9 + .../plan-22-logically-bound-install.fmf | 9 + .../plan-23-install-outside-container.fmf | 8 + tmt/plans/integration/plan-23-usroverlay.fmf | 8 + .../plan-24-image-upgrade-reboot.fmf | 13 + tmt/plans/integration/plan-25-soft-reboot.fmf | 8 + .../plan-26-download-only-upgrade.fmf | 8 + .../plan-27-custom-selinux-policy.fmf | 13 + .../integration/plan-28-factory-reset.fmf | 9 + .../plan-29-soft-reboot-selinux-policy.fmf | 9 + .../plan-30-install-unified-flag.fmf | 9 + .../plan-31-switch-mutate-in-place.fmf | 9 + .../integration/plan-31-switch-to-unified.fmf | 9 + ...lan-32-install-to-filesystem-var-mount.fmf | 8 + .../integration/plan-32-multi-device-esp.fmf | 8 + tmt/plans/integration/plan-33-bib-build.fmf | 9 + tmt/plans/integration/plan-34-user-agent.fmf | 8 + .../integration/plan-35-composefs-gc.fmf | 10 + .../plan-35-upgrade-preflight-disk-check.fmf | 8 + tmt/plans/integration/plan-36-rollback.fmf | 8 + .../plan-37-install-no-boot-dir.fmf | 9 + .../plan-37-upgrade-check-status.fmf | 9 + .../plan-38-install-bootloader-none.fmf | 9 + tmt/plans/integration/plan-39-upgrade-tag.fmf | 8 + .../plan-40-install-karg-delete.fmf | 9 + .../integration/plan-41-composefs-gc-uki.fmf | 9 + .../plan-42-loader-entries-source.fmf | 9 + .../plan-43-switch-same-digest.fmf | 9 + .../integration/plan-44-shadow-fixup.fmf | 8 + ...5-composefs-corrupted-state-resilience.fmf | 9 + .../plan-46-etc-merge-conflict.fmf | 9 + .../plan-47-download-only-switch.fmf | 8 + .../plan-48-composefs-uki-dumpfile.fmf | 9 + .../plan-49-composefs-1-16-bridge.fmf | 14 + .../plan-50-switch-zstd-chunked.fmf | 13 + .../integration/plan-52-install-repart.fmf | 8 + .../plan-57-composefs-separate-boot.fmf | 10 + .../plan-60-install-composefs-native.fmf | 9 + tmt/tests/tests.fmf | 234 +--------- tmt/tests/tests/test-01-readonly.fmf | 6 + .../tests/test-20-image-pushpull-upgrade.fmf | 6 + .../tests/test-21-logically-bound-switch.fmf | 6 + .../tests/test-22-logically-bound-install.fmf | 6 + .../test-23-install-outside-container.fmf | 6 + tmt/tests/tests/test-23-usroverlay.fmf | 6 + .../tests/test-24-image-upgrade-reboot.fmf | 10 + tmt/tests/tests/test-25-soft-reboot.fmf | 6 + .../tests/test-26-download-only-upgrade.fmf | 6 + .../tests/test-27-custom-selinux-policy.fmf | 10 + tmt/tests/tests/test-28-factory-reset.fmf | 6 + .../test-29-soft-reboot-selinux-policy.fmf | 6 + .../tests/test-30-install-unified-flag.fmf | 6 + .../tests/test-31-switch-mutate-in-place.fmf | 6 + tmt/tests/tests/test-31-switch-to-unified.fmf | 6 + ...est-32-install-to-filesystem-var-mount.fmf | 11 + tmt/tests/tests/test-32-multi-device-esp.fmf | 6 + tmt/tests/tests/test-33-bib-build.fmf | 8 + tmt/tests/tests/test-34-user-agent.fmf | 6 + tmt/tests/tests/test-35-composefs-gc.fmf | 6 + .../test-35-upgrade-preflight-disk-check.fmf | 6 + tmt/tests/tests/test-36-rollback.fmf | 6 + .../tests/test-37-install-no-boot-dir.fmf | 6 + .../tests/test-37-upgrade-check-status.fmf | 6 + .../tests/test-38-install-bootloader-none.fmf | 6 + tmt/tests/tests/test-39-upgrade-tag.fmf | 6 + .../tests/test-40-install-karg-delete.fmf | 6 + tmt/tests/tests/test-41-composefs-gc-uki.fmf | 6 + .../tests/test-42-loader-entries-source.fmf | 6 + .../tests/test-43-switch-same-digest.fmf | 6 + tmt/tests/tests/test-44-shadow-fixup.fmf | 6 + ...5-composefs-corrupted-state-resilience.fmf | 6 + .../tests/test-46-etc-merge-conflict.fmf | 6 + .../tests/test-47-download-only-switch.fmf | 6 + .../tests/test-48-composefs-uki-dumpfile.fmf | 6 + .../tests/test-49-composefs-1-16-bridge.fmf | 10 + .../tests/test-50-switch-zstd-chunked.fmf | 10 + tmt/tests/tests/test-52-install-repart.fmf | 6 + .../tests/test-57-composefs-separate-boot.fmf | 9 + .../test-60-install-composefs-native.fmf | 6 + 83 files changed, 789 insertions(+), 802 deletions(-) create mode 100644 tmt/plans/integration/plan-01-readonly.fmf create mode 100644 tmt/plans/integration/plan-20-image-pushpull-upgrade.fmf create mode 100644 tmt/plans/integration/plan-21-logically-bound-switch.fmf create mode 100644 tmt/plans/integration/plan-22-logically-bound-install.fmf create mode 100644 tmt/plans/integration/plan-23-install-outside-container.fmf create mode 100644 tmt/plans/integration/plan-23-usroverlay.fmf create mode 100644 tmt/plans/integration/plan-24-image-upgrade-reboot.fmf create mode 100644 tmt/plans/integration/plan-25-soft-reboot.fmf create mode 100644 tmt/plans/integration/plan-26-download-only-upgrade.fmf create mode 100644 tmt/plans/integration/plan-27-custom-selinux-policy.fmf create mode 100644 tmt/plans/integration/plan-28-factory-reset.fmf create mode 100644 tmt/plans/integration/plan-29-soft-reboot-selinux-policy.fmf create mode 100644 tmt/plans/integration/plan-30-install-unified-flag.fmf create mode 100644 tmt/plans/integration/plan-31-switch-mutate-in-place.fmf create mode 100644 tmt/plans/integration/plan-31-switch-to-unified.fmf create mode 100644 tmt/plans/integration/plan-32-install-to-filesystem-var-mount.fmf create mode 100644 tmt/plans/integration/plan-32-multi-device-esp.fmf create mode 100644 tmt/plans/integration/plan-33-bib-build.fmf create mode 100644 tmt/plans/integration/plan-34-user-agent.fmf create mode 100644 tmt/plans/integration/plan-35-composefs-gc.fmf create mode 100644 tmt/plans/integration/plan-35-upgrade-preflight-disk-check.fmf create mode 100644 tmt/plans/integration/plan-36-rollback.fmf create mode 100644 tmt/plans/integration/plan-37-install-no-boot-dir.fmf create mode 100644 tmt/plans/integration/plan-37-upgrade-check-status.fmf create mode 100644 tmt/plans/integration/plan-38-install-bootloader-none.fmf create mode 100644 tmt/plans/integration/plan-39-upgrade-tag.fmf create mode 100644 tmt/plans/integration/plan-40-install-karg-delete.fmf create mode 100644 tmt/plans/integration/plan-41-composefs-gc-uki.fmf create mode 100644 tmt/plans/integration/plan-42-loader-entries-source.fmf create mode 100644 tmt/plans/integration/plan-43-switch-same-digest.fmf create mode 100644 tmt/plans/integration/plan-44-shadow-fixup.fmf create mode 100644 tmt/plans/integration/plan-45-composefs-corrupted-state-resilience.fmf create mode 100644 tmt/plans/integration/plan-46-etc-merge-conflict.fmf create mode 100644 tmt/plans/integration/plan-47-download-only-switch.fmf create mode 100644 tmt/plans/integration/plan-48-composefs-uki-dumpfile.fmf create mode 100644 tmt/plans/integration/plan-49-composefs-1-16-bridge.fmf create mode 100644 tmt/plans/integration/plan-50-switch-zstd-chunked.fmf create mode 100644 tmt/plans/integration/plan-52-install-repart.fmf create mode 100644 tmt/plans/integration/plan-57-composefs-separate-boot.fmf create mode 100644 tmt/plans/integration/plan-60-install-composefs-native.fmf create mode 100644 tmt/tests/tests/test-01-readonly.fmf create mode 100644 tmt/tests/tests/test-20-image-pushpull-upgrade.fmf create mode 100644 tmt/tests/tests/test-21-logically-bound-switch.fmf create mode 100644 tmt/tests/tests/test-22-logically-bound-install.fmf create mode 100644 tmt/tests/tests/test-23-install-outside-container.fmf create mode 100644 tmt/tests/tests/test-23-usroverlay.fmf create mode 100644 tmt/tests/tests/test-24-image-upgrade-reboot.fmf create mode 100644 tmt/tests/tests/test-25-soft-reboot.fmf create mode 100644 tmt/tests/tests/test-26-download-only-upgrade.fmf create mode 100644 tmt/tests/tests/test-27-custom-selinux-policy.fmf create mode 100644 tmt/tests/tests/test-28-factory-reset.fmf create mode 100644 tmt/tests/tests/test-29-soft-reboot-selinux-policy.fmf create mode 100644 tmt/tests/tests/test-30-install-unified-flag.fmf create mode 100644 tmt/tests/tests/test-31-switch-mutate-in-place.fmf create mode 100644 tmt/tests/tests/test-31-switch-to-unified.fmf create mode 100644 tmt/tests/tests/test-32-install-to-filesystem-var-mount.fmf create mode 100644 tmt/tests/tests/test-32-multi-device-esp.fmf create mode 100644 tmt/tests/tests/test-33-bib-build.fmf create mode 100644 tmt/tests/tests/test-34-user-agent.fmf create mode 100644 tmt/tests/tests/test-35-composefs-gc.fmf create mode 100644 tmt/tests/tests/test-35-upgrade-preflight-disk-check.fmf create mode 100644 tmt/tests/tests/test-36-rollback.fmf create mode 100644 tmt/tests/tests/test-37-install-no-boot-dir.fmf create mode 100644 tmt/tests/tests/test-37-upgrade-check-status.fmf create mode 100644 tmt/tests/tests/test-38-install-bootloader-none.fmf create mode 100644 tmt/tests/tests/test-39-upgrade-tag.fmf create mode 100644 tmt/tests/tests/test-40-install-karg-delete.fmf create mode 100644 tmt/tests/tests/test-41-composefs-gc-uki.fmf create mode 100644 tmt/tests/tests/test-42-loader-entries-source.fmf create mode 100644 tmt/tests/tests/test-43-switch-same-digest.fmf create mode 100644 tmt/tests/tests/test-44-shadow-fixup.fmf create mode 100644 tmt/tests/tests/test-45-composefs-corrupted-state-resilience.fmf create mode 100644 tmt/tests/tests/test-46-etc-merge-conflict.fmf create mode 100644 tmt/tests/tests/test-47-download-only-switch.fmf create mode 100644 tmt/tests/tests/test-48-composefs-uki-dumpfile.fmf create mode 100644 tmt/tests/tests/test-49-composefs-1-16-bridge.fmf create mode 100644 tmt/tests/tests/test-50-switch-zstd-chunked.fmf create mode 100644 tmt/tests/tests/test-52-install-repart.fmf create mode 100644 tmt/tests/tests/test-57-composefs-separate-boot.fmf create mode 100644 tmt/tests/tests/test-60-install-composefs-native.fmf diff --git a/crates/xtask/src/tmt.rs b/crates/xtask/src/tmt.rs index dc98a343a2..f7aabf34c9 100644 --- a/crates/xtask/src/tmt.rs +++ b/crates/xtask/src/tmt.rs @@ -4,9 +4,13 @@ use fn_error_context::context; use rand::RngExt; use xshell::{Shell, cmd}; -// Generation markers for integration.fmf -const PLAN_MARKER_BEGIN: &str = "# BEGIN GENERATED PLANS\n"; -const PLAN_MARKER_END: &str = "# END GENERATED PLANS\n"; +// Directories of generated files, one fmf file per test and per plan, so that +// changes adding tests in parallel don't conflict. The hand-written common +// settings live next to them in tmt/tests/tests.fmf and tmt/plans/integration.fmf. +const TMT_TESTS_DIR: &str = "tmt/tests/tests"; +const TMT_PLANS_DIR: &str = "tmt/plans/integration"; +const GENERATED_HEADER: &str = + "# THIS IS GENERATED CODE - DO NOT EDIT\n# Generated by: cargo xtask tmt\n\n"; // VM and SSH connectivity timeouts for bcvk integration // Cloud-init can take 2-3 minutes to start SSH @@ -277,93 +281,40 @@ struct PlanMetadata { skip_if_uki: bool, } -/// Parse integration.fmf to extract extra-try_bind_storage for all plans -#[context("Parsing integration.fmf")] +/// Parse the generated plan files to extract the `extra-*` flags of all plans, +/// keyed by plan name with a leading slash (e.g. `/plan-readonly`). +#[context("Parsing plan files in {plans_dir}")] fn parse_plan_metadata( - plans_file: &Utf8Path, + plans_dir: &Utf8Path, ) -> Result> { - let content = std::fs::read_to_string(plans_file)?; - let yaml = serde_yaml::from_str::(&content) - .context("Failed to parse integration.fmf YAML")?; + let mut plan_metadata = std::collections::HashMap::new(); - let Some(mapping) = yaml.as_mapping() else { - anyhow::bail!("Expected YAML mapping in integration.fmf"); - }; - - let mut plan_metadata: std::collections::HashMap = - std::collections::HashMap::new(); - - for (key, value) in mapping { - let Some(plan_name) = key.as_str() else { + for path in list_fmf_files(plans_dir)? { + let Some(stem) = path.file_stem().filter(|s| s.starts_with("plan-")) else { continue; }; - if !plan_name.starts_with("/plan-") { - continue; - } - - let Some(plan_data) = value.as_mapping() else { - continue; + let content = std::fs::read_to_string(&path).with_context(|| format!("Reading {path}"))?; + let yaml = serde_yaml::from_str::(&content) + .with_context(|| format!("Failed to parse {path} as YAML"))?; + let Some(plan_data) = yaml.as_mapping() else { + anyhow::bail!("Expected YAML mapping in {path}"); }; - if let Some(try_bind) = plan_data.get(&serde_yaml::Value::String(format!( - "extra-{}", - FIELD_TRY_BIND_STORAGE - ))) { - if let Some(b) = try_bind.as_bool() { - plan_metadata - .entry(plan_name.to_string()) - .and_modify(|m| m.try_bind_storage = b) - .or_insert(PlanMetadata { - try_bind_storage: b, - ..Default::default() - }); - } - } - - if let Some(works_for_composefs) = plan_data.get(&serde_yaml::Value::String(format!( - "extra-{}", - FIELD_FIXME_SKIP_IF_COMPOSEFS - ))) { - if let Some(b) = works_for_composefs.as_bool() { - plan_metadata - .entry(plan_name.to_string()) - .and_modify(|m| m.skip_if_composefs = b) - .or_insert(PlanMetadata { - skip_if_composefs: b, - ..Default::default() - }); - } - } - - if let Some(skip_if_uki) = plan_data.get(&serde_yaml::Value::String(format!( - "extra-{}", - FIELD_FIXME_SKIP_IF_UKI - ))) { - if let Some(b) = skip_if_uki.as_bool() { - plan_metadata - .entry(plan_name.to_string()) - .and_modify(|m| m.skip_if_uki = b) - .or_insert(PlanMetadata { - skip_if_uki: b, - ..Default::default() - }); - } - } - - if let Some(skip_if_ostree) = plan_data.get(&serde_yaml::Value::String(format!( - "extra-{}", - FIELD_SKIP_IF_OSTREE - ))) { - if let Some(b) = skip_if_ostree.as_bool() { - plan_metadata - .entry(plan_name.to_string()) - .and_modify(|m| m.skip_if_ostree = b) - .or_insert(PlanMetadata { - skip_if_ostree: b, - ..Default::default() - }); - } - } + let flag = |field: &str| { + plan_data + .get(&serde_yaml::Value::String(format!("extra-{field}"))) + .and_then(|v| v.as_bool()) + .unwrap_or(false) + }; + plan_metadata.insert( + format!("/{stem}"), + PlanMetadata { + try_bind_storage: flag(FIELD_TRY_BIND_STORAGE), + skip_if_composefs: flag(FIELD_FIXME_SKIP_IF_COMPOSEFS), + skip_if_ostree: flag(FIELD_SKIP_IF_OSTREE), + skip_if_uki: flag(FIELD_FIXME_SKIP_IF_UKI), + }, + ); } Ok(plan_metadata) @@ -437,9 +388,8 @@ pub(crate) fn run_tmt(sh: &Shell, args: &RunTmtArgs) -> Result<()> { // Change to workdir for running tmt commands let _dir = sh.push_dir(workdir); - // Parse plan metadata from integration.fmf - let plans_file = Utf8Path::new("tmt/plans/integration.fmf"); - let plan_metadata = parse_plan_metadata(plans_file)?; + // Parse plan metadata from the generated plan files + let plan_metadata = parse_plan_metadata(Utf8Path::new(TMT_PLANS_DIR))?; // Get the list of plans println!("Discovering test plans..."); @@ -1074,69 +1024,114 @@ impl PartialOrd for TestDef { } } +/// A generated file: its path relative to the repository root and contents. +struct GeneratedFile { + path: Utf8PathBuf, + content: String, +} + +/// Every `.fmf` file directly in `dir`, as repository-relative paths. +/// A missing directory is treated as empty. +fn list_fmf_files(dir: &Utf8Path) -> Result> { + let entries = match std::fs::read_dir(dir) { + Ok(entries) => entries, + Err(e) if e.kind() == std::io::ErrorKind::NotFound => return Ok(Vec::new()), + Err(e) => return Err(e).with_context(|| format!("Reading directory {dir}")), + }; + let mut files = Vec::new(); + for entry in entries { + let path = Utf8PathBuf::try_from(entry?.path())?; + if path.extension() == Some("fmf") { + files.push(path); + } + } + files.sort(); + Ok(files) +} + /// Check that tmt generated files are up to date. /// Fails with an error if any file would change, similar to `cargo fmt --check`. #[context("Checking TMT generated files")] pub(crate) fn check_integration() -> Result<()> { - let tests_fmf_path = Utf8Path::new("tmt/tests/tests.fmf"); - let integration_fmf_path = Utf8Path::new("tmt/plans/integration.fmf"); - - let (tests_generated, integration_generated) = generate_integration()?; - - let tests_on_disk = std::fs::read_to_string(tests_fmf_path) - .with_context(|| format!("Reading {}", tests_fmf_path))?; - let integration_on_disk = std::fs::read_to_string(integration_fmf_path) - .with_context(|| format!("Reading {}", integration_fmf_path))?; + let generated = generate_integration()?; - if tests_generated != tests_on_disk { - return out_of_sync_error(&format!("{tests_fmf_path} is out of date")); + for file in &generated { + let on_disk = match std::fs::read_to_string(&file.path) { + Ok(c) => c, + Err(e) if e.kind() == std::io::ErrorKind::NotFound => { + return out_of_sync_error(&format!("{} is missing", file.path)); + } + Err(e) => return Err(e).with_context(|| format!("Reading {}", file.path)), + }; + if on_disk != file.content { + return out_of_sync_error(&format!("{} is out of date", file.path)); + } } - if integration_generated != integration_on_disk { - return out_of_sync_error(&format!("{integration_fmf_path} is out of date")); + for dir in [TMT_TESTS_DIR, TMT_PLANS_DIR] { + for path in list_fmf_files(Utf8Path::new(dir))? { + if !generated.iter().any(|f| f.path == path) { + return out_of_sync_error(&format!("{path} is stale")); + } + } } Ok(()) } -/// Generate tmt/plans/integration.fmf from test definitions -#[context("Updating TMT integration.fmf")] +/// Generate the per-test files in tmt/tests/tests/ and the per-plan files in +/// tmt/plans/integration/ from the test definitions. +#[context("Updating TMT integration files")] pub(crate) fn update_integration() -> Result<()> { - let tests_fmf_path = Utf8Path::new("tmt/tests/tests.fmf"); - let integration_fmf_path = Utf8Path::new("tmt/plans/integration.fmf"); + let generated = generate_integration()?; - let (tests_content, integration_content) = generate_integration()?; + for dir in [TMT_TESTS_DIR, TMT_PLANS_DIR] { + std::fs::create_dir_all(dir).with_context(|| format!("Creating {dir}"))?; + } - let needs_update_tests = match std::fs::read_to_string(tests_fmf_path) { - Ok(existing) => existing != tests_content, - Err(_) => true, - }; - if needs_update_tests { - std::fs::write(tests_fmf_path, &tests_content).context("Writing tests.fmf")?; - println!("Generated {}", tests_fmf_path); - } else { - println!("Unchanged: {}", tests_fmf_path); + for file in &generated { + if std::fs::read_to_string(&file.path).is_ok_and(|existing| existing == file.content) { + continue; + } + std::fs::write(&file.path, &file.content) + .with_context(|| format!("Writing {}", file.path))?; + println!("Generated {}", file.path); } - let needs_update_integration = match std::fs::read_to_string(integration_fmf_path) { - Ok(existing) => existing != integration_content, - Err(_) => true, - }; - if needs_update_integration { - std::fs::write(integration_fmf_path, &integration_content) - .context("Writing integration.fmf")?; - println!("Generated {}", integration_fmf_path); - } else { - println!("Unchanged: {}", integration_fmf_path); + // Drop files for tests that were removed or renamed. + for dir in [TMT_TESTS_DIR, TMT_PLANS_DIR] { + for path in list_fmf_files(Utf8Path::new(dir))? { + if !generated.iter().any(|f| f.path == path) { + std::fs::remove_file(&path).with_context(|| format!("Removing {path}"))?; + println!("Removed {path}"); + } + } } Ok(()) } -/// Pure function: compute the content of tests.fmf and integration.fmf from -/// the test file metadata in tmt/tests/booted/, without writing to disk. -/// Returns (tests_fmf_content, integration_fmf_content). +/// Serialize a YAML mapping as the contents of a generated fmf file. +fn render_generated(mapping: serde_yaml::Mapping) -> Result { + let yaml = serde_yaml::to_string(&serde_yaml::Value::Mapping(mapping)) + .context("Serializing to YAML")?; + let mut out = String::from(GENERATED_HEADER); + for line in yaml.lines() { + // serde_yaml emits sequence items at the indentation of their key; + // nest the list of discovered tests one level deeper for readability. + if line.starts_with(" - /tmt/tests/") { + out.push_str(" "); + } + out.push_str(line); + out.push('\n'); + } + Ok(out) +} + +/// Pure function: compute the contents of every generated tmt/tests/tests/*.fmf +/// and tmt/plans/integration/*.fmf file from the test file metadata in +/// tmt/tests/booted/, without writing to disk. #[context("Generating TMT integration content")] -fn generate_integration() -> Result<(String, String)> { +fn generate_integration() -> Result> { // Define tests in order let mut tests = vec![]; @@ -1270,14 +1265,12 @@ fn generate_integration() -> Result<(String, String)> { tests.sort(); - // Generate single tests.fmf file using structured YAML - - // Build YAML structure - let mut tests_mapping = serde_yaml::Mapping::new(); + let mut generated = Vec::with_capacity(tests.len() * 2); for test in &tests { - let test_key = format!("/test-{:02}-{}", test.number, test.name); + let test_id = format!("test-{:02}-{}", test.number, test.name); + let plan_id = format!("plan-{:02}-{}", test.number, test.name); - // Start with the tmt metadata (summary, duration, adjust, etc.) + // The test: start with the tmt metadata (summary, duration, adjust, etc.) let mut test_value = if let serde_yaml::Value::Mapping(map) = &test.tmt { map.clone() } else { @@ -1289,50 +1282,12 @@ fn generate_integration() -> Result<(String, String)> { serde_yaml::Value::String("test".to_string()), serde_yaml::Value::String(test.test_command.clone()), ); + generated.push(GeneratedFile { + path: Utf8Path::new(TMT_TESTS_DIR).join(format!("{test_id}.fmf")), + content: render_generated(test_value)?, + }); - tests_mapping.insert( - serde_yaml::Value::String(test_key), - serde_yaml::Value::Mapping(test_value), - ); - } - - // Serialize to YAML - let tests_yaml = serde_yaml::to_string(&serde_yaml::Value::Mapping(tests_mapping)) - .context("Serializing tests to YAML")?; - - // Post-process YAML to add blank lines between tests for readability - let mut tests_yaml_formatted = String::new(); - for line in tests_yaml.lines() { - if line.starts_with("/test-") && !tests_yaml_formatted.is_empty() { - tests_yaml_formatted.push('\n'); - } - tests_yaml_formatted.push_str(line); - tests_yaml_formatted.push('\n'); - } - - // Build final content with header - let mut tests_content = String::new(); - tests_content.push_str("# THIS IS GENERATED CODE - DO NOT EDIT\n"); - tests_content.push_str("# Generated by: cargo xtask tmt\n"); - tests_content.push_str("\n"); - // bootc probes for SELinux mac_admin capability by attempting chcon with - // an intentionally invalid label, which generates expected AVC denials. - // Report as informational only in OSCI gating test - tests_content - .push_str("# bootc probes for SELinux mac_admin capability by attempting chcon with\n"); - tests_content - .push_str("# an intentionally invalid label, which generates expected AVC denials.\n"); - tests_content.push_str("# Report as informational only in OSCI gating test\n"); - tests_content.push_str("check:\n"); - tests_content.push_str(" - how: avc\n"); - tests_content.push_str(" result: info\n"); - tests_content.push_str("\n"); - tests_content.push_str(&tests_yaml_formatted); - - // Generate plans section using structured YAML - let mut plans_mapping = serde_yaml::Mapping::new(); - for test in &tests { - let plan_key = format!("/plan-{:02}-{}", test.number, test.name); + // The plan let mut plan_value = serde_yaml::Mapping::new(); // Extract summary from tmt metadata @@ -1357,7 +1312,7 @@ fn generate_integration() -> Result<(String, String)> { serde_yaml::Value::String("how".to_string()), serde_yaml::Value::String("fmf".to_string()), ); - let test_path = format!("/tmt/tests/tests/test-{:02}-{}", test.number, test.name); + let test_path = format!("/{TMT_TESTS_DIR}/{test_id}"); discover.insert( serde_yaml::Value::String("test".to_string()), serde_yaml::Value::Sequence(vec![serde_yaml::Value::String(test_path)]), @@ -1377,82 +1332,27 @@ fn generate_integration() -> Result<(String, String)> { } } - // Add extra-try_bind_storage if test wants it - if test.try_bind_storage { - plan_value.insert( - serde_yaml::Value::String(format!("extra-{}", FIELD_TRY_BIND_STORAGE)), - serde_yaml::Value::Bool(true), - ); - } - - if test.skip_if_composefs { - plan_value.insert( - serde_yaml::Value::String(format!("extra-{}", FIELD_FIXME_SKIP_IF_COMPOSEFS)), - serde_yaml::Value::Bool(true), - ); - } - - if test.skip_if_ostree { - plan_value.insert( - serde_yaml::Value::String(format!("extra-{}", FIELD_SKIP_IF_OSTREE)), - serde_yaml::Value::Bool(true), - ); - } - - if test.skip_if_uki { - plan_value.insert( - serde_yaml::Value::String(format!("extra-{}", FIELD_FIXME_SKIP_IF_UKI)), - serde_yaml::Value::Bool(true), - ); + for (wanted, field) in [ + (test.try_bind_storage, FIELD_TRY_BIND_STORAGE), + (test.skip_if_composefs, FIELD_FIXME_SKIP_IF_COMPOSEFS), + (test.skip_if_ostree, FIELD_SKIP_IF_OSTREE), + (test.skip_if_uki, FIELD_FIXME_SKIP_IF_UKI), + ] { + if wanted { + plan_value.insert( + serde_yaml::Value::String(format!("extra-{field}")), + serde_yaml::Value::Bool(true), + ); + } } - plans_mapping.insert( - serde_yaml::Value::String(plan_key), - serde_yaml::Value::Mapping(plan_value), - ); - } - - // Serialize plans to YAML - let plans_yaml = serde_yaml::to_string(&serde_yaml::Value::Mapping(plans_mapping)) - .context("Serializing plans to YAML")?; - - // Post-process YAML to add blank lines between plans for readability - // and fix indentation for test list items - let mut plans_section = String::new(); - for line in plans_yaml.lines() { - if line.starts_with("/plan-") && !plans_section.is_empty() { - plans_section.push('\n'); - } - // Fix indentation: YAML serializer uses 2-space indent for list items, - // but we want them at 6 spaces (4 for discover + 2 for test) - if line.starts_with(" - /tmt/tests/") { - plans_section.push_str(" "); - plans_section.push_str(line.trim_start()); - } else { - plans_section.push_str(line); - } - plans_section.push('\n'); + generated.push(GeneratedFile { + path: Utf8Path::new(TMT_PLANS_DIR).join(format!("{plan_id}.fmf")), + content: render_generated(plan_value)?, + }); } - // Build integration.fmf content by splicing the generated plans section - // between the existing marker lines, preserving hand-written content outside them. - let integration_fmf_path = Utf8Path::new("tmt/plans/integration.fmf"); - let existing_content = - std::fs::read_to_string(integration_fmf_path).context("Reading integration.fmf")?; - - let (before_plans, rest) = existing_content - .split_once(PLAN_MARKER_BEGIN) - .context("Missing # BEGIN GENERATED PLANS marker in integration.fmf")?; - let (_old_plans, after_plans) = rest - .split_once(PLAN_MARKER_END) - .context("Missing # END GENERATED PLANS marker in integration.fmf")?; - - let integration_content = format!( - "{}{}{}{}{}", - before_plans, PLAN_MARKER_BEGIN, plans_section, PLAN_MARKER_END, after_plans - ); - - Ok((tests_content, integration_content)) + Ok(generated) } #[cfg(test)] diff --git a/tmt/plans/integration.fmf b/tmt/plans/integration.fmf index 90e02dc28b..ad82ecce59 100644 --- a/tmt/plans/integration.fmf +++ b/tmt/plans/integration.fmf @@ -42,329 +42,5 @@ prepare: execute: how: tmt -# BEGIN GENERATED PLANS -/plan-01-readonly: - summary: Execute booted readonly/nondestructive tests - discover: - how: fmf - test: - - /tmt/tests/tests/test-01-readonly - extra-try_bind_storage: true - -/plan-20-image-pushpull-upgrade: - summary: Execute local upgrade tests - discover: - how: fmf - test: - - /tmt/tests/tests/test-20-image-pushpull-upgrade - -/plan-21-logically-bound-switch: - summary: Execute logically bound images tests for switching images - discover: - how: fmf - test: - - /tmt/tests/tests/test-21-logically-bound-switch - extra-fixme_skip_if_composefs: true - -/plan-22-logically-bound-install: - summary: Execute logically bound images tests for installing image - discover: - how: fmf - test: - - /tmt/tests/tests/test-22-logically-bound-install - extra-fixme_skip_if_composefs: true - -/plan-23-install-outside-container: - summary: Execute tests for installing outside of a container - discover: - how: fmf - test: - - /tmt/tests/tests/test-23-install-outside-container - -/plan-23-usroverlay: - summary: Execute tests for bootc usrover - discover: - how: fmf - test: - - /tmt/tests/tests/test-23-usroverlay - -/plan-24-image-upgrade-reboot: - summary: Execute local upgrade tests - discover: - how: fmf - test: - - /tmt/tests/tests/test-24-image-upgrade-reboot - adjust: - - when: distro == centos-9 and boot_type == uki and seal_state == sealed - enabled: false - because: CentOS 9 cannot consume the signed host upgrade because shared storage is unavailable and its guest-local UKI builder produces unsigned images - extra-try_bind_storage: true - -/plan-25-soft-reboot: - summary: Execute soft reboot test - discover: - how: fmf - test: - - /tmt/tests/tests/test-25-soft-reboot - -/plan-26-download-only-upgrade: - summary: Execute download-only upgrade tests - discover: - how: fmf - test: - - /tmt/tests/tests/test-26-download-only-upgrade - -/plan-27-custom-selinux-policy: - summary: Execute custom selinux policy test - discover: - how: fmf - test: - - /tmt/tests/tests/test-27-custom-selinux-policy - adjust: - - when: running_env != image_mode - enabled: false - because: these tests require features only available in image mode - extra-fixme_skip_if_composefs: true - -/plan-28-factory-reset: - summary: Execute factory reset tests - discover: - how: fmf - test: - - /tmt/tests/tests/test-28-factory-reset - extra-fixme_skip_if_composefs: true - -/plan-29-soft-reboot-selinux-policy: - summary: Test soft reboot with SELinux policy changes - discover: - how: fmf - test: - - /tmt/tests/tests/test-29-soft-reboot-selinux-policy - extra-fixme_skip_if_uki: true - -/plan-30-install-unified-flag: - summary: Test bootc install with experimental unified storage flag - discover: - how: fmf - test: - - /tmt/tests/tests/test-30-install-unified-flag - extra-fixme_skip_if_composefs: true - -/plan-31-switch-mutate-in-place: - summary: switch --mutate-in-place - discover: - how: fmf - test: - - /tmt/tests/tests/test-31-switch-mutate-in-place - extra-fixme_skip_if_composefs: true - -/plan-31-switch-to-unified: - summary: Onboard to unified storage, build derived image, and switch to it - discover: - how: fmf - test: - - /tmt/tests/tests/test-31-switch-to-unified - extra-fixme_skip_if_composefs: true - -/plan-32-install-to-filesystem-var-mount: - summary: Test bootc install to-filesystem with separate /var mount - discover: - how: fmf - test: - - /tmt/tests/tests/test-32-install-to-filesystem-var-mount - -/plan-32-multi-device-esp: - summary: Test multi-device ESP detection for to-existing-root - discover: - how: fmf - test: - - /tmt/tests/tests/test-32-multi-device-esp - -/plan-33-bib-build: - summary: Test building a qcow2 disk image with bootc-image-builder - discover: - how: fmf - test: - - /tmt/tests/tests/test-33-bib-build - extra-fixme_skip_if_composefs: true - -/plan-34-user-agent: - summary: Verify bootc sends correct User-Agent header to registries - discover: - how: fmf - test: - - /tmt/tests/tests/test-34-user-agent - -/plan-35-composefs-gc: - summary: Test composefs garbage collection with same and different kernel+initrd - discover: - how: fmf - test: - - /tmt/tests/tests/test-35-composefs-gc - extra-skip_if_ostree: true - extra-fixme_skip_if_uki: true - -/plan-35-upgrade-preflight-disk-check: - summary: Verify pre-flight disk space check rejects images with inflated layer sizes - discover: - how: fmf - test: - - /tmt/tests/tests/test-35-upgrade-preflight-disk-check - -/plan-36-rollback: - summary: Test bootc rollback functionality - discover: - how: fmf - test: - - /tmt/tests/tests/test-36-rollback - -/plan-37-install-no-boot-dir: - summary: Test bootc install to-filesystem without /boot directory - discover: - how: fmf - test: - - /tmt/tests/tests/test-37-install-no-boot-dir - extra-fixme_skip_if_composefs: true - -/plan-37-upgrade-check-status: - summary: Verify upgrade --check populates cached update in status - discover: - how: fmf - test: - - /tmt/tests/tests/test-37-upgrade-check-status - extra-fixme_skip_if_composefs: true - -/plan-38-install-bootloader-none: - summary: Test bootc install with --bootloader=none - discover: - how: fmf - test: - - /tmt/tests/tests/test-38-install-bootloader-none - extra-fixme_skip_if_composefs: true - -/plan-39-upgrade-tag: - summary: Test bootc upgrade --tag functionality with containers-storage - discover: - how: fmf - test: - - /tmt/tests/tests/test-39-upgrade-tag - -/plan-40-install-karg-delete: - summary: Test bootc install --karg-delete - discover: - how: fmf - test: - - /tmt/tests/tests/test-40-install-karg-delete - extra-fixme_skip_if_composefs: true - -/plan-41-composefs-gc-uki: - summary: Test composefs garbage collection for UKI - discover: - how: fmf - test: - - /tmt/tests/tests/test-41-composefs-gc-uki - extra-skip_if_ostree: true - -/plan-42-loader-entries-source: - summary: Test bootc loader-entries set-options-for-source - discover: - how: fmf - test: - - /tmt/tests/tests/test-42-loader-entries-source - extra-fixme_skip_if_composefs: true - -/plan-43-switch-same-digest: - summary: Error on bootc switch to image with identical fs-verity digest - discover: - how: fmf - test: - - /tmt/tests/tests/test-43-switch-same-digest - extra-skip_if_ostree: true - -/plan-44-shadow-fixup: - summary: Test bootc-sysusers-shadow-sync removes orphaned gshadow entries before sysusers - discover: - how: fmf - test: - - /tmt/tests/tests/test-44-shadow-fixup - -/plan-45-composefs-corrupted-state-resilience: - summary: Test composefs backend resilience to state corruption - discover: - how: fmf - test: - - /tmt/tests/tests/test-45-composefs-corrupted-state-resilience - extra-skip_if_ostree: true - -/plan-46-etc-merge-conflict: - summary: Verify etc merge conflicts are caught during upgrade, not finalization - discover: - how: fmf - test: - - /tmt/tests/tests/test-46-etc-merge-conflict - extra-skip_if_ostree: true - -/plan-47-download-only-switch: - summary: Execute download-only switch tests - discover: - how: fmf - test: - - /tmt/tests/tests/test-47-download-only-switch - -/plan-48-composefs-uki-dumpfile: - summary: Test composefs UKI dumpfile diff print - discover: - how: fmf - test: - - /tmt/tests/tests/test-48-composefs-uki-dumpfile - extra-skip_if_ostree: true - -/plan-49-composefs-1-16-bridge: - summary: Test bootc 1.16 old-stager migration for sealed and unsealed UKIs - enabled: false - discover: - how: fmf - test: - - /tmt/tests/tests/test-49-composefs-1-16-bridge - adjust: - - when: composefs_bridge == true - enabled: true - extra-try_bind_storage: true - extra-skip_if_ostree: true - -/plan-50-switch-zstd-chunked: - summary: Switch to an image with zstd:chunked compressed layers - discover: - how: fmf - test: - - /tmt/tests/tests/test-50-switch-zstd-chunked - adjust: - - when: running_env != image_mode - enabled: false - because: only the image_mode test image installs bootc-tests - extra-skip_if_ostree: true - -/plan-52-install-repart: - summary: Test bootc install to-disk with systemd-repart partitioning - discover: - how: fmf - test: - - /tmt/tests/tests/test-52-install-repart - -/plan-57-composefs-separate-boot: - summary: Test composefs with GRUB and a separate /boot partition - discover: - how: fmf - test: - - /tmt/tests/tests/test-57-composefs-separate-boot - extra-skip_if_ostree: true - extra-fixme_skip_if_uki: true - -/plan-60-install-composefs-native: - summary: Test that composefs-native images default to the composefs backend - discover: - how: fmf - test: - - /tmt/tests/tests/test-60-install-composefs-native - extra-fixme_skip_if_uki: true -# END GENERATED PLANS +# The plans are generated, one file each, by `cargo xtask tmt` into the +# integration/ directory next to this file, and inherit the settings above. diff --git a/tmt/plans/integration/plan-01-readonly.fmf b/tmt/plans/integration/plan-01-readonly.fmf new file mode 100644 index 0000000000..0c35610928 --- /dev/null +++ b/tmt/plans/integration/plan-01-readonly.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute booted readonly/nondestructive tests +discover: + how: fmf + test: + - /tmt/tests/tests/test-01-readonly +extra-try_bind_storage: true diff --git a/tmt/plans/integration/plan-20-image-pushpull-upgrade.fmf b/tmt/plans/integration/plan-20-image-pushpull-upgrade.fmf new file mode 100644 index 0000000000..24d5096027 --- /dev/null +++ b/tmt/plans/integration/plan-20-image-pushpull-upgrade.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute local upgrade tests +discover: + how: fmf + test: + - /tmt/tests/tests/test-20-image-pushpull-upgrade diff --git a/tmt/plans/integration/plan-21-logically-bound-switch.fmf b/tmt/plans/integration/plan-21-logically-bound-switch.fmf new file mode 100644 index 0000000000..101af4b87d --- /dev/null +++ b/tmt/plans/integration/plan-21-logically-bound-switch.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute logically bound images tests for switching images +discover: + how: fmf + test: + - /tmt/tests/tests/test-21-logically-bound-switch +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-22-logically-bound-install.fmf b/tmt/plans/integration/plan-22-logically-bound-install.fmf new file mode 100644 index 0000000000..e34c120b78 --- /dev/null +++ b/tmt/plans/integration/plan-22-logically-bound-install.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute logically bound images tests for installing image +discover: + how: fmf + test: + - /tmt/tests/tests/test-22-logically-bound-install +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-23-install-outside-container.fmf b/tmt/plans/integration/plan-23-install-outside-container.fmf new file mode 100644 index 0000000000..0b093564a4 --- /dev/null +++ b/tmt/plans/integration/plan-23-install-outside-container.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute tests for installing outside of a container +discover: + how: fmf + test: + - /tmt/tests/tests/test-23-install-outside-container diff --git a/tmt/plans/integration/plan-23-usroverlay.fmf b/tmt/plans/integration/plan-23-usroverlay.fmf new file mode 100644 index 0000000000..6660b74dc0 --- /dev/null +++ b/tmt/plans/integration/plan-23-usroverlay.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute tests for bootc usrover +discover: + how: fmf + test: + - /tmt/tests/tests/test-23-usroverlay diff --git a/tmt/plans/integration/plan-24-image-upgrade-reboot.fmf b/tmt/plans/integration/plan-24-image-upgrade-reboot.fmf new file mode 100644 index 0000000000..9c841daa25 --- /dev/null +++ b/tmt/plans/integration/plan-24-image-upgrade-reboot.fmf @@ -0,0 +1,13 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute local upgrade tests +discover: + how: fmf + test: + - /tmt/tests/tests/test-24-image-upgrade-reboot +adjust: +- when: distro == centos-9 and boot_type == uki and seal_state == sealed + enabled: false + because: CentOS 9 cannot consume the signed host upgrade because shared storage is unavailable and its guest-local UKI builder produces unsigned images +extra-try_bind_storage: true diff --git a/tmt/plans/integration/plan-25-soft-reboot.fmf b/tmt/plans/integration/plan-25-soft-reboot.fmf new file mode 100644 index 0000000000..4227a88ff5 --- /dev/null +++ b/tmt/plans/integration/plan-25-soft-reboot.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute soft reboot test +discover: + how: fmf + test: + - /tmt/tests/tests/test-25-soft-reboot diff --git a/tmt/plans/integration/plan-26-download-only-upgrade.fmf b/tmt/plans/integration/plan-26-download-only-upgrade.fmf new file mode 100644 index 0000000000..2b8b48edd6 --- /dev/null +++ b/tmt/plans/integration/plan-26-download-only-upgrade.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute download-only upgrade tests +discover: + how: fmf + test: + - /tmt/tests/tests/test-26-download-only-upgrade diff --git a/tmt/plans/integration/plan-27-custom-selinux-policy.fmf b/tmt/plans/integration/plan-27-custom-selinux-policy.fmf new file mode 100644 index 0000000000..2d6eacfce1 --- /dev/null +++ b/tmt/plans/integration/plan-27-custom-selinux-policy.fmf @@ -0,0 +1,13 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute custom selinux policy test +discover: + how: fmf + test: + - /tmt/tests/tests/test-27-custom-selinux-policy +adjust: +- when: running_env != image_mode + enabled: false + because: these tests require features only available in image mode +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-28-factory-reset.fmf b/tmt/plans/integration/plan-28-factory-reset.fmf new file mode 100644 index 0000000000..571c68176a --- /dev/null +++ b/tmt/plans/integration/plan-28-factory-reset.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute factory reset tests +discover: + how: fmf + test: + - /tmt/tests/tests/test-28-factory-reset +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-29-soft-reboot-selinux-policy.fmf b/tmt/plans/integration/plan-29-soft-reboot-selinux-policy.fmf new file mode 100644 index 0000000000..e73de27e96 --- /dev/null +++ b/tmt/plans/integration/plan-29-soft-reboot-selinux-policy.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test soft reboot with SELinux policy changes +discover: + how: fmf + test: + - /tmt/tests/tests/test-29-soft-reboot-selinux-policy +extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-30-install-unified-flag.fmf b/tmt/plans/integration/plan-30-install-unified-flag.fmf new file mode 100644 index 0000000000..1f95214cc0 --- /dev/null +++ b/tmt/plans/integration/plan-30-install-unified-flag.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install with experimental unified storage flag +discover: + how: fmf + test: + - /tmt/tests/tests/test-30-install-unified-flag +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-31-switch-mutate-in-place.fmf b/tmt/plans/integration/plan-31-switch-mutate-in-place.fmf new file mode 100644 index 0000000000..4d5db791e0 --- /dev/null +++ b/tmt/plans/integration/plan-31-switch-mutate-in-place.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: switch --mutate-in-place +discover: + how: fmf + test: + - /tmt/tests/tests/test-31-switch-mutate-in-place +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-31-switch-to-unified.fmf b/tmt/plans/integration/plan-31-switch-to-unified.fmf new file mode 100644 index 0000000000..04e1703a73 --- /dev/null +++ b/tmt/plans/integration/plan-31-switch-to-unified.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Onboard to unified storage, build derived image, and switch to it +discover: + how: fmf + test: + - /tmt/tests/tests/test-31-switch-to-unified +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-32-install-to-filesystem-var-mount.fmf b/tmt/plans/integration/plan-32-install-to-filesystem-var-mount.fmf new file mode 100644 index 0000000000..1b3b84d4ab --- /dev/null +++ b/tmt/plans/integration/plan-32-install-to-filesystem-var-mount.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install to-filesystem with separate /var mount +discover: + how: fmf + test: + - /tmt/tests/tests/test-32-install-to-filesystem-var-mount diff --git a/tmt/plans/integration/plan-32-multi-device-esp.fmf b/tmt/plans/integration/plan-32-multi-device-esp.fmf new file mode 100644 index 0000000000..6d1f68a3f2 --- /dev/null +++ b/tmt/plans/integration/plan-32-multi-device-esp.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test multi-device ESP detection for to-existing-root +discover: + how: fmf + test: + - /tmt/tests/tests/test-32-multi-device-esp diff --git a/tmt/plans/integration/plan-33-bib-build.fmf b/tmt/plans/integration/plan-33-bib-build.fmf new file mode 100644 index 0000000000..24f28c54d1 --- /dev/null +++ b/tmt/plans/integration/plan-33-bib-build.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test building a qcow2 disk image with bootc-image-builder +discover: + how: fmf + test: + - /tmt/tests/tests/test-33-bib-build +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-34-user-agent.fmf b/tmt/plans/integration/plan-34-user-agent.fmf new file mode 100644 index 0000000000..0961206067 --- /dev/null +++ b/tmt/plans/integration/plan-34-user-agent.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify bootc sends correct User-Agent header to registries +discover: + how: fmf + test: + - /tmt/tests/tests/test-34-user-agent diff --git a/tmt/plans/integration/plan-35-composefs-gc.fmf b/tmt/plans/integration/plan-35-composefs-gc.fmf new file mode 100644 index 0000000000..db6ef00764 --- /dev/null +++ b/tmt/plans/integration/plan-35-composefs-gc.fmf @@ -0,0 +1,10 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs garbage collection with same and different kernel+initrd +discover: + how: fmf + test: + - /tmt/tests/tests/test-35-composefs-gc +extra-skip_if_ostree: true +extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-35-upgrade-preflight-disk-check.fmf b/tmt/plans/integration/plan-35-upgrade-preflight-disk-check.fmf new file mode 100644 index 0000000000..d8b06d0361 --- /dev/null +++ b/tmt/plans/integration/plan-35-upgrade-preflight-disk-check.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify pre-flight disk space check rejects images with inflated layer sizes +discover: + how: fmf + test: + - /tmt/tests/tests/test-35-upgrade-preflight-disk-check diff --git a/tmt/plans/integration/plan-36-rollback.fmf b/tmt/plans/integration/plan-36-rollback.fmf new file mode 100644 index 0000000000..d0c04f65c3 --- /dev/null +++ b/tmt/plans/integration/plan-36-rollback.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc rollback functionality +discover: + how: fmf + test: + - /tmt/tests/tests/test-36-rollback diff --git a/tmt/plans/integration/plan-37-install-no-boot-dir.fmf b/tmt/plans/integration/plan-37-install-no-boot-dir.fmf new file mode 100644 index 0000000000..bfbaf6c8be --- /dev/null +++ b/tmt/plans/integration/plan-37-install-no-boot-dir.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install to-filesystem without /boot directory +discover: + how: fmf + test: + - /tmt/tests/tests/test-37-install-no-boot-dir +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-37-upgrade-check-status.fmf b/tmt/plans/integration/plan-37-upgrade-check-status.fmf new file mode 100644 index 0000000000..59a63556ed --- /dev/null +++ b/tmt/plans/integration/plan-37-upgrade-check-status.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify upgrade --check populates cached update in status +discover: + how: fmf + test: + - /tmt/tests/tests/test-37-upgrade-check-status +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-38-install-bootloader-none.fmf b/tmt/plans/integration/plan-38-install-bootloader-none.fmf new file mode 100644 index 0000000000..b3240f5eb5 --- /dev/null +++ b/tmt/plans/integration/plan-38-install-bootloader-none.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install with --bootloader=none +discover: + how: fmf + test: + - /tmt/tests/tests/test-38-install-bootloader-none +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-39-upgrade-tag.fmf b/tmt/plans/integration/plan-39-upgrade-tag.fmf new file mode 100644 index 0000000000..7d4b58e940 --- /dev/null +++ b/tmt/plans/integration/plan-39-upgrade-tag.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc upgrade --tag functionality with containers-storage +discover: + how: fmf + test: + - /tmt/tests/tests/test-39-upgrade-tag diff --git a/tmt/plans/integration/plan-40-install-karg-delete.fmf b/tmt/plans/integration/plan-40-install-karg-delete.fmf new file mode 100644 index 0000000000..fe0c1c1f17 --- /dev/null +++ b/tmt/plans/integration/plan-40-install-karg-delete.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install --karg-delete +discover: + how: fmf + test: + - /tmt/tests/tests/test-40-install-karg-delete +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-41-composefs-gc-uki.fmf b/tmt/plans/integration/plan-41-composefs-gc-uki.fmf new file mode 100644 index 0000000000..14c58b15e2 --- /dev/null +++ b/tmt/plans/integration/plan-41-composefs-gc-uki.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs garbage collection for UKI +discover: + how: fmf + test: + - /tmt/tests/tests/test-41-composefs-gc-uki +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-42-loader-entries-source.fmf b/tmt/plans/integration/plan-42-loader-entries-source.fmf new file mode 100644 index 0000000000..334955af78 --- /dev/null +++ b/tmt/plans/integration/plan-42-loader-entries-source.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc loader-entries set-options-for-source +discover: + how: fmf + test: + - /tmt/tests/tests/test-42-loader-entries-source +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-43-switch-same-digest.fmf b/tmt/plans/integration/plan-43-switch-same-digest.fmf new file mode 100644 index 0000000000..630a852ff3 --- /dev/null +++ b/tmt/plans/integration/plan-43-switch-same-digest.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Error on bootc switch to image with identical fs-verity digest +discover: + how: fmf + test: + - /tmt/tests/tests/test-43-switch-same-digest +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-44-shadow-fixup.fmf b/tmt/plans/integration/plan-44-shadow-fixup.fmf new file mode 100644 index 0000000000..7b9f71ce91 --- /dev/null +++ b/tmt/plans/integration/plan-44-shadow-fixup.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc-sysusers-shadow-sync removes orphaned gshadow entries before sysusers +discover: + how: fmf + test: + - /tmt/tests/tests/test-44-shadow-fixup diff --git a/tmt/plans/integration/plan-45-composefs-corrupted-state-resilience.fmf b/tmt/plans/integration/plan-45-composefs-corrupted-state-resilience.fmf new file mode 100644 index 0000000000..e5fd427181 --- /dev/null +++ b/tmt/plans/integration/plan-45-composefs-corrupted-state-resilience.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs backend resilience to state corruption +discover: + how: fmf + test: + - /tmt/tests/tests/test-45-composefs-corrupted-state-resilience +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-46-etc-merge-conflict.fmf b/tmt/plans/integration/plan-46-etc-merge-conflict.fmf new file mode 100644 index 0000000000..e08d07577e --- /dev/null +++ b/tmt/plans/integration/plan-46-etc-merge-conflict.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify etc merge conflicts are caught during upgrade, not finalization +discover: + how: fmf + test: + - /tmt/tests/tests/test-46-etc-merge-conflict +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-47-download-only-switch.fmf b/tmt/plans/integration/plan-47-download-only-switch.fmf new file mode 100644 index 0000000000..5e17aeb655 --- /dev/null +++ b/tmt/plans/integration/plan-47-download-only-switch.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute download-only switch tests +discover: + how: fmf + test: + - /tmt/tests/tests/test-47-download-only-switch diff --git a/tmt/plans/integration/plan-48-composefs-uki-dumpfile.fmf b/tmt/plans/integration/plan-48-composefs-uki-dumpfile.fmf new file mode 100644 index 0000000000..da6513ed2e --- /dev/null +++ b/tmt/plans/integration/plan-48-composefs-uki-dumpfile.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs UKI dumpfile diff print +discover: + how: fmf + test: + - /tmt/tests/tests/test-48-composefs-uki-dumpfile +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-49-composefs-1-16-bridge.fmf b/tmt/plans/integration/plan-49-composefs-1-16-bridge.fmf new file mode 100644 index 0000000000..92cada768b --- /dev/null +++ b/tmt/plans/integration/plan-49-composefs-1-16-bridge.fmf @@ -0,0 +1,14 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc 1.16 old-stager migration for sealed and unsealed UKIs +enabled: false +discover: + how: fmf + test: + - /tmt/tests/tests/test-49-composefs-1-16-bridge +adjust: +- when: composefs_bridge == true + enabled: true +extra-try_bind_storage: true +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-50-switch-zstd-chunked.fmf b/tmt/plans/integration/plan-50-switch-zstd-chunked.fmf new file mode 100644 index 0000000000..627ef98785 --- /dev/null +++ b/tmt/plans/integration/plan-50-switch-zstd-chunked.fmf @@ -0,0 +1,13 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Switch to an image with zstd:chunked compressed layers +discover: + how: fmf + test: + - /tmt/tests/tests/test-50-switch-zstd-chunked +adjust: +- when: running_env != image_mode + enabled: false + because: only the image_mode test image installs bootc-tests +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-52-install-repart.fmf b/tmt/plans/integration/plan-52-install-repart.fmf new file mode 100644 index 0000000000..048f47c2a9 --- /dev/null +++ b/tmt/plans/integration/plan-52-install-repart.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install to-disk with systemd-repart partitioning +discover: + how: fmf + test: + - /tmt/tests/tests/test-52-install-repart diff --git a/tmt/plans/integration/plan-57-composefs-separate-boot.fmf b/tmt/plans/integration/plan-57-composefs-separate-boot.fmf new file mode 100644 index 0000000000..b402218302 --- /dev/null +++ b/tmt/plans/integration/plan-57-composefs-separate-boot.fmf @@ -0,0 +1,10 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs with GRUB and a separate /boot partition +discover: + how: fmf + test: + - /tmt/tests/tests/test-57-composefs-separate-boot +extra-skip_if_ostree: true +extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-60-install-composefs-native.fmf b/tmt/plans/integration/plan-60-install-composefs-native.fmf new file mode 100644 index 0000000000..082a22caf3 --- /dev/null +++ b/tmt/plans/integration/plan-60-install-composefs-native.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test that composefs-native images default to the composefs backend +discover: + how: fmf + test: + - /tmt/tests/tests/test-60-install-composefs-native +extra-fixme_skip_if_uki: true diff --git a/tmt/tests/tests.fmf b/tmt/tests/tests.fmf index 28300bfebe..08b882c082 100644 --- a/tmt/tests/tests.fmf +++ b/tmt/tests/tests.fmf @@ -1,5 +1,6 @@ -# THIS IS GENERATED CODE - DO NOT EDIT -# Generated by: cargo xtask tmt +# Common settings for all tests in the tests/ directory next to this file. +# The tests themselves are generated, one file each, by `cargo xtask tmt` +# from the metadata at the top of tmt/tests/booted/test-*. # bootc probes for SELinux mac_admin capability by attempting chcon with # an intentionally invalid label, which generates expected AVC denials. @@ -8,228 +9,7 @@ check: - how: avc result: info -/test-01-readonly: - summary: Execute booted readonly/nondestructive tests - duration: 30m - test: nu booted/test-01-readonly.nu - -/test-20-image-pushpull-upgrade: - summary: Execute local upgrade tests - duration: 30m - test: nu booted/test-image-pushpull-upgrade.nu - -/test-21-logically-bound-switch: - summary: Execute logically bound images tests for switching images - duration: 30m - test: nu booted/test-logically-bound-switch.nu - -/test-22-logically-bound-install: - summary: Execute logically bound images tests for installing image - duration: 30m - test: nu booted/test-logically-bound-install.nu - -/test-23-install-outside-container: - summary: Execute tests for installing outside of a container - duration: 30m - test: nu booted/test-install-outside-container.nu - -/test-23-usroverlay: - summary: Execute tests for bootc usrover - duration: 30m - test: nu booted/test-usroverlay.nu - -/test-24-image-upgrade-reboot: - summary: Execute local upgrade tests - duration: 30m - adjust: - - when: distro == centos-9 and boot_type == uki and seal_state == sealed - enabled: false - because: CentOS 9 cannot consume the signed host upgrade because shared storage is unavailable and its guest-local UKI builder produces unsigned images - test: nu booted/test-image-upgrade-reboot.nu - -/test-25-soft-reboot: - summary: Execute soft reboot test - duration: 30m - test: nu booted/test-soft-reboot.nu - -/test-26-download-only-upgrade: - summary: Execute download-only upgrade tests - duration: 40m - test: nu booted/test-download-only-upgrade.nu - -/test-27-custom-selinux-policy: - summary: Execute custom selinux policy test - duration: 30m - adjust: - - when: running_env != image_mode - enabled: false - because: these tests require features only available in image mode - test: nu booted/test-custom-selinux-policy.nu - -/test-28-factory-reset: - summary: Execute factory reset tests - duration: 30m - test: nu booted/test-factory-reset.nu - -/test-29-soft-reboot-selinux-policy: - summary: Test soft reboot with SELinux policy changes - duration: 30m - test: nu booted/test-soft-reboot-selinux-policy.nu - -/test-30-install-unified-flag: - summary: Test bootc install with experimental unified storage flag - duration: 30m - test: nu booted/test-install-unified-flag.nu - -/test-31-switch-mutate-in-place: - summary: switch --mutate-in-place - duration: 30m - test: nu booted/test-switch-mutate-in-place.nu - -/test-31-switch-to-unified: - summary: Onboard to unified storage, build derived image, and switch to it - duration: 30m - test: nu booted/test-switch-to-unified.nu - -/test-32-install-to-filesystem-var-mount: - summary: Test bootc install to-filesystem with separate /var mount - duration: 30m - require: - - parted - - lvm2 - - dosfstools - - e2fsprogs - test: bash booted/test-install-to-filesystem-var-mount.sh - -/test-32-multi-device-esp: - summary: Test multi-device ESP detection for to-existing-root - duration: 60m - test: nu booted/test-multi-device-esp.nu - -/test-33-bib-build: - summary: Test building a qcow2 disk image with bootc-image-builder - duration: 45m - require: - - qemu-img - test: nu booted/test-bib-build.nu - -/test-34-user-agent: - summary: Verify bootc sends correct User-Agent header to registries - duration: 10m - test: python3 booted/test-user-agent.py - -/test-35-composefs-gc: - summary: Test composefs garbage collection with same and different kernel+initrd - duration: 30m - test: nu booted/test-composefs-gc.nu - -/test-35-upgrade-preflight-disk-check: - summary: Verify pre-flight disk space check rejects images with inflated layer sizes - duration: 10m - test: nu booted/test-upgrade-preflight-disk-check.nu - -/test-36-rollback: - summary: Test bootc rollback functionality - duration: 30m - test: nu booted/test-rollback.nu - -/test-37-install-no-boot-dir: - summary: Test bootc install to-filesystem without /boot directory - duration: 30m - test: nu booted/test-install-no-boot-dir.nu - -/test-37-upgrade-check-status: - summary: Verify upgrade --check populates cached update in status - duration: 30m - test: nu booted/test-upgrade-check-status.nu - -/test-38-install-bootloader-none: - summary: Test bootc install with --bootloader=none - duration: 30m - test: nu booted/test-install-bootloader-none.nu - -/test-39-upgrade-tag: - summary: Test bootc upgrade --tag functionality with containers-storage - duration: 30m - test: nu booted/test-upgrade-tag.nu - -/test-40-install-karg-delete: - summary: Test bootc install --karg-delete - duration: 30m - test: nu booted/test-install-karg-delete.nu - -/test-41-composefs-gc-uki: - summary: Test composefs garbage collection for UKI - duration: 30m - test: nu booted/test-composefs-gc-uki.nu - -/test-42-loader-entries-source: - summary: Test bootc loader-entries set-options-for-source - duration: 30m - test: nu booted/test-loader-entries-source.nu - -/test-43-switch-same-digest: - summary: Error on bootc switch to image with identical fs-verity digest - duration: 10m - test: nu booted/test-switch-same-digest.nu - -/test-44-shadow-fixup: - summary: Test bootc-sysusers-shadow-sync removes orphaned gshadow entries before sysusers - duration: 30m - test: nu booted/test-44-shadow-fixup.nu - -/test-45-composefs-corrupted-state-resilience: - summary: Test composefs backend resilience to state corruption - duration: 30m - test: nu booted/test-composefs-corrupted-state-resilience.nu - -/test-46-etc-merge-conflict: - summary: Verify etc merge conflicts are caught during upgrade, not finalization - duration: 15m - test: nu booted/test-etc-merge-conflict.nu - -/test-47-download-only-switch: - summary: Execute download-only switch tests - duration: 40m - test: nu booted/test-download-only-switch.nu - -/test-48-composefs-uki-dumpfile: - summary: Test composefs UKI dumpfile diff print - duration: 30m - test: nu booted/test-composefs-uki-dumpfile.nu - -/test-49-composefs-1-16-bridge: - summary: Test bootc 1.16 old-stager migration for sealed and unsealed UKIs - duration: 45m - enabled: false - adjust: - - when: composefs_bridge == true - enabled: true - test: nu booted/test-49-composefs-1-16-bridge.nu - -/test-50-switch-zstd-chunked: - summary: Switch to an image with zstd:chunked compressed layers - duration: 30m - adjust: - - when: running_env != image_mode - enabled: false - because: only the image_mode test image installs bootc-tests - test: bootc-integration-tests booted switch-zstd-chunked - -/test-52-install-repart: - summary: Test bootc install to-disk with systemd-repart partitioning - duration: 30m - test: nu booted/test-install-repart.nu - -/test-57-composefs-separate-boot: - summary: Test composefs with GRUB and a separate /boot partition - duration: 60m - require: - - dosfstools - - e2fsprogs - test: nu booted/test-composefs-separate-boot.nu - -/test-60-install-composefs-native: - summary: Test that composefs-native images default to the composefs backend - duration: 45m - test: nu booted/test-install-composefs-native.nu +# The generated tests live one directory deeper than the scripts they run +# (which are referenced relative to tmt/tests), so don't derive the working +# directory from where the test is defined. +path: /tmt/tests diff --git a/tmt/tests/tests/test-01-readonly.fmf b/tmt/tests/tests/test-01-readonly.fmf new file mode 100644 index 0000000000..2ed95c2ac5 --- /dev/null +++ b/tmt/tests/tests/test-01-readonly.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute booted readonly/nondestructive tests +duration: 30m +test: nu booted/test-01-readonly.nu diff --git a/tmt/tests/tests/test-20-image-pushpull-upgrade.fmf b/tmt/tests/tests/test-20-image-pushpull-upgrade.fmf new file mode 100644 index 0000000000..f366f83a07 --- /dev/null +++ b/tmt/tests/tests/test-20-image-pushpull-upgrade.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute local upgrade tests +duration: 30m +test: nu booted/test-image-pushpull-upgrade.nu diff --git a/tmt/tests/tests/test-21-logically-bound-switch.fmf b/tmt/tests/tests/test-21-logically-bound-switch.fmf new file mode 100644 index 0000000000..268f4eb82c --- /dev/null +++ b/tmt/tests/tests/test-21-logically-bound-switch.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute logically bound images tests for switching images +duration: 30m +test: nu booted/test-logically-bound-switch.nu diff --git a/tmt/tests/tests/test-22-logically-bound-install.fmf b/tmt/tests/tests/test-22-logically-bound-install.fmf new file mode 100644 index 0000000000..4f88323f16 --- /dev/null +++ b/tmt/tests/tests/test-22-logically-bound-install.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute logically bound images tests for installing image +duration: 30m +test: nu booted/test-logically-bound-install.nu diff --git a/tmt/tests/tests/test-23-install-outside-container.fmf b/tmt/tests/tests/test-23-install-outside-container.fmf new file mode 100644 index 0000000000..0c877ba273 --- /dev/null +++ b/tmt/tests/tests/test-23-install-outside-container.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute tests for installing outside of a container +duration: 30m +test: nu booted/test-install-outside-container.nu diff --git a/tmt/tests/tests/test-23-usroverlay.fmf b/tmt/tests/tests/test-23-usroverlay.fmf new file mode 100644 index 0000000000..c16f9e72ae --- /dev/null +++ b/tmt/tests/tests/test-23-usroverlay.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute tests for bootc usrover +duration: 30m +test: nu booted/test-usroverlay.nu diff --git a/tmt/tests/tests/test-24-image-upgrade-reboot.fmf b/tmt/tests/tests/test-24-image-upgrade-reboot.fmf new file mode 100644 index 0000000000..f6de9a3702 --- /dev/null +++ b/tmt/tests/tests/test-24-image-upgrade-reboot.fmf @@ -0,0 +1,10 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute local upgrade tests +duration: 30m +adjust: +- when: distro == centos-9 and boot_type == uki and seal_state == sealed + enabled: false + because: CentOS 9 cannot consume the signed host upgrade because shared storage is unavailable and its guest-local UKI builder produces unsigned images +test: nu booted/test-image-upgrade-reboot.nu diff --git a/tmt/tests/tests/test-25-soft-reboot.fmf b/tmt/tests/tests/test-25-soft-reboot.fmf new file mode 100644 index 0000000000..30d7b9a2f7 --- /dev/null +++ b/tmt/tests/tests/test-25-soft-reboot.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute soft reboot test +duration: 30m +test: nu booted/test-soft-reboot.nu diff --git a/tmt/tests/tests/test-26-download-only-upgrade.fmf b/tmt/tests/tests/test-26-download-only-upgrade.fmf new file mode 100644 index 0000000000..f6fa92270e --- /dev/null +++ b/tmt/tests/tests/test-26-download-only-upgrade.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute download-only upgrade tests +duration: 40m +test: nu booted/test-download-only-upgrade.nu diff --git a/tmt/tests/tests/test-27-custom-selinux-policy.fmf b/tmt/tests/tests/test-27-custom-selinux-policy.fmf new file mode 100644 index 0000000000..6af10e6f12 --- /dev/null +++ b/tmt/tests/tests/test-27-custom-selinux-policy.fmf @@ -0,0 +1,10 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute custom selinux policy test +duration: 30m +adjust: +- when: running_env != image_mode + enabled: false + because: these tests require features only available in image mode +test: nu booted/test-custom-selinux-policy.nu diff --git a/tmt/tests/tests/test-28-factory-reset.fmf b/tmt/tests/tests/test-28-factory-reset.fmf new file mode 100644 index 0000000000..f8f6818f0e --- /dev/null +++ b/tmt/tests/tests/test-28-factory-reset.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute factory reset tests +duration: 30m +test: nu booted/test-factory-reset.nu diff --git a/tmt/tests/tests/test-29-soft-reboot-selinux-policy.fmf b/tmt/tests/tests/test-29-soft-reboot-selinux-policy.fmf new file mode 100644 index 0000000000..0a0330ebed --- /dev/null +++ b/tmt/tests/tests/test-29-soft-reboot-selinux-policy.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test soft reboot with SELinux policy changes +duration: 30m +test: nu booted/test-soft-reboot-selinux-policy.nu diff --git a/tmt/tests/tests/test-30-install-unified-flag.fmf b/tmt/tests/tests/test-30-install-unified-flag.fmf new file mode 100644 index 0000000000..2fe1ab437a --- /dev/null +++ b/tmt/tests/tests/test-30-install-unified-flag.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install with experimental unified storage flag +duration: 30m +test: nu booted/test-install-unified-flag.nu diff --git a/tmt/tests/tests/test-31-switch-mutate-in-place.fmf b/tmt/tests/tests/test-31-switch-mutate-in-place.fmf new file mode 100644 index 0000000000..026cc2e15b --- /dev/null +++ b/tmt/tests/tests/test-31-switch-mutate-in-place.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: switch --mutate-in-place +duration: 30m +test: nu booted/test-switch-mutate-in-place.nu diff --git a/tmt/tests/tests/test-31-switch-to-unified.fmf b/tmt/tests/tests/test-31-switch-to-unified.fmf new file mode 100644 index 0000000000..ead0029130 --- /dev/null +++ b/tmt/tests/tests/test-31-switch-to-unified.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Onboard to unified storage, build derived image, and switch to it +duration: 30m +test: nu booted/test-switch-to-unified.nu diff --git a/tmt/tests/tests/test-32-install-to-filesystem-var-mount.fmf b/tmt/tests/tests/test-32-install-to-filesystem-var-mount.fmf new file mode 100644 index 0000000000..46e8bd7880 --- /dev/null +++ b/tmt/tests/tests/test-32-install-to-filesystem-var-mount.fmf @@ -0,0 +1,11 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install to-filesystem with separate /var mount +duration: 30m +require: +- parted +- lvm2 +- dosfstools +- e2fsprogs +test: bash booted/test-install-to-filesystem-var-mount.sh diff --git a/tmt/tests/tests/test-32-multi-device-esp.fmf b/tmt/tests/tests/test-32-multi-device-esp.fmf new file mode 100644 index 0000000000..c6955e9bfe --- /dev/null +++ b/tmt/tests/tests/test-32-multi-device-esp.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test multi-device ESP detection for to-existing-root +duration: 60m +test: nu booted/test-multi-device-esp.nu diff --git a/tmt/tests/tests/test-33-bib-build.fmf b/tmt/tests/tests/test-33-bib-build.fmf new file mode 100644 index 0000000000..29a349f818 --- /dev/null +++ b/tmt/tests/tests/test-33-bib-build.fmf @@ -0,0 +1,8 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test building a qcow2 disk image with bootc-image-builder +duration: 45m +require: +- qemu-img +test: nu booted/test-bib-build.nu diff --git a/tmt/tests/tests/test-34-user-agent.fmf b/tmt/tests/tests/test-34-user-agent.fmf new file mode 100644 index 0000000000..943176531d --- /dev/null +++ b/tmt/tests/tests/test-34-user-agent.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify bootc sends correct User-Agent header to registries +duration: 10m +test: python3 booted/test-user-agent.py diff --git a/tmt/tests/tests/test-35-composefs-gc.fmf b/tmt/tests/tests/test-35-composefs-gc.fmf new file mode 100644 index 0000000000..6f3485c281 --- /dev/null +++ b/tmt/tests/tests/test-35-composefs-gc.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs garbage collection with same and different kernel+initrd +duration: 30m +test: nu booted/test-composefs-gc.nu diff --git a/tmt/tests/tests/test-35-upgrade-preflight-disk-check.fmf b/tmt/tests/tests/test-35-upgrade-preflight-disk-check.fmf new file mode 100644 index 0000000000..68c04763b8 --- /dev/null +++ b/tmt/tests/tests/test-35-upgrade-preflight-disk-check.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify pre-flight disk space check rejects images with inflated layer sizes +duration: 10m +test: nu booted/test-upgrade-preflight-disk-check.nu diff --git a/tmt/tests/tests/test-36-rollback.fmf b/tmt/tests/tests/test-36-rollback.fmf new file mode 100644 index 0000000000..9fbb43b34f --- /dev/null +++ b/tmt/tests/tests/test-36-rollback.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc rollback functionality +duration: 30m +test: nu booted/test-rollback.nu diff --git a/tmt/tests/tests/test-37-install-no-boot-dir.fmf b/tmt/tests/tests/test-37-install-no-boot-dir.fmf new file mode 100644 index 0000000000..caa4b0b9b0 --- /dev/null +++ b/tmt/tests/tests/test-37-install-no-boot-dir.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install to-filesystem without /boot directory +duration: 30m +test: nu booted/test-install-no-boot-dir.nu diff --git a/tmt/tests/tests/test-37-upgrade-check-status.fmf b/tmt/tests/tests/test-37-upgrade-check-status.fmf new file mode 100644 index 0000000000..0a892d234c --- /dev/null +++ b/tmt/tests/tests/test-37-upgrade-check-status.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify upgrade --check populates cached update in status +duration: 30m +test: nu booted/test-upgrade-check-status.nu diff --git a/tmt/tests/tests/test-38-install-bootloader-none.fmf b/tmt/tests/tests/test-38-install-bootloader-none.fmf new file mode 100644 index 0000000000..ac97b44796 --- /dev/null +++ b/tmt/tests/tests/test-38-install-bootloader-none.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install with --bootloader=none +duration: 30m +test: nu booted/test-install-bootloader-none.nu diff --git a/tmt/tests/tests/test-39-upgrade-tag.fmf b/tmt/tests/tests/test-39-upgrade-tag.fmf new file mode 100644 index 0000000000..c8eeadc85e --- /dev/null +++ b/tmt/tests/tests/test-39-upgrade-tag.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc upgrade --tag functionality with containers-storage +duration: 30m +test: nu booted/test-upgrade-tag.nu diff --git a/tmt/tests/tests/test-40-install-karg-delete.fmf b/tmt/tests/tests/test-40-install-karg-delete.fmf new file mode 100644 index 0000000000..479dc3c13a --- /dev/null +++ b/tmt/tests/tests/test-40-install-karg-delete.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install --karg-delete +duration: 30m +test: nu booted/test-install-karg-delete.nu diff --git a/tmt/tests/tests/test-41-composefs-gc-uki.fmf b/tmt/tests/tests/test-41-composefs-gc-uki.fmf new file mode 100644 index 0000000000..e94608d727 --- /dev/null +++ b/tmt/tests/tests/test-41-composefs-gc-uki.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs garbage collection for UKI +duration: 30m +test: nu booted/test-composefs-gc-uki.nu diff --git a/tmt/tests/tests/test-42-loader-entries-source.fmf b/tmt/tests/tests/test-42-loader-entries-source.fmf new file mode 100644 index 0000000000..e226c6a9ab --- /dev/null +++ b/tmt/tests/tests/test-42-loader-entries-source.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc loader-entries set-options-for-source +duration: 30m +test: nu booted/test-loader-entries-source.nu diff --git a/tmt/tests/tests/test-43-switch-same-digest.fmf b/tmt/tests/tests/test-43-switch-same-digest.fmf new file mode 100644 index 0000000000..da798e8efc --- /dev/null +++ b/tmt/tests/tests/test-43-switch-same-digest.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Error on bootc switch to image with identical fs-verity digest +duration: 10m +test: nu booted/test-switch-same-digest.nu diff --git a/tmt/tests/tests/test-44-shadow-fixup.fmf b/tmt/tests/tests/test-44-shadow-fixup.fmf new file mode 100644 index 0000000000..e2cb6965be --- /dev/null +++ b/tmt/tests/tests/test-44-shadow-fixup.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc-sysusers-shadow-sync removes orphaned gshadow entries before sysusers +duration: 30m +test: nu booted/test-44-shadow-fixup.nu diff --git a/tmt/tests/tests/test-45-composefs-corrupted-state-resilience.fmf b/tmt/tests/tests/test-45-composefs-corrupted-state-resilience.fmf new file mode 100644 index 0000000000..3ca165b748 --- /dev/null +++ b/tmt/tests/tests/test-45-composefs-corrupted-state-resilience.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs backend resilience to state corruption +duration: 30m +test: nu booted/test-composefs-corrupted-state-resilience.nu diff --git a/tmt/tests/tests/test-46-etc-merge-conflict.fmf b/tmt/tests/tests/test-46-etc-merge-conflict.fmf new file mode 100644 index 0000000000..79fcfabfe6 --- /dev/null +++ b/tmt/tests/tests/test-46-etc-merge-conflict.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Verify etc merge conflicts are caught during upgrade, not finalization +duration: 15m +test: nu booted/test-etc-merge-conflict.nu diff --git a/tmt/tests/tests/test-47-download-only-switch.fmf b/tmt/tests/tests/test-47-download-only-switch.fmf new file mode 100644 index 0000000000..a70c80fd3d --- /dev/null +++ b/tmt/tests/tests/test-47-download-only-switch.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Execute download-only switch tests +duration: 40m +test: nu booted/test-download-only-switch.nu diff --git a/tmt/tests/tests/test-48-composefs-uki-dumpfile.fmf b/tmt/tests/tests/test-48-composefs-uki-dumpfile.fmf new file mode 100644 index 0000000000..39a18bd3cf --- /dev/null +++ b/tmt/tests/tests/test-48-composefs-uki-dumpfile.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs UKI dumpfile diff print +duration: 30m +test: nu booted/test-composefs-uki-dumpfile.nu diff --git a/tmt/tests/tests/test-49-composefs-1-16-bridge.fmf b/tmt/tests/tests/test-49-composefs-1-16-bridge.fmf new file mode 100644 index 0000000000..972a42f145 --- /dev/null +++ b/tmt/tests/tests/test-49-composefs-1-16-bridge.fmf @@ -0,0 +1,10 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc 1.16 old-stager migration for sealed and unsealed UKIs +duration: 45m +enabled: false +adjust: +- when: composefs_bridge == true + enabled: true +test: nu booted/test-49-composefs-1-16-bridge.nu diff --git a/tmt/tests/tests/test-50-switch-zstd-chunked.fmf b/tmt/tests/tests/test-50-switch-zstd-chunked.fmf new file mode 100644 index 0000000000..a26f4783b5 --- /dev/null +++ b/tmt/tests/tests/test-50-switch-zstd-chunked.fmf @@ -0,0 +1,10 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Switch to an image with zstd:chunked compressed layers +duration: 30m +adjust: +- when: running_env != image_mode + enabled: false + because: only the image_mode test image installs bootc-tests +test: bootc-integration-tests booted switch-zstd-chunked diff --git a/tmt/tests/tests/test-52-install-repart.fmf b/tmt/tests/tests/test-52-install-repart.fmf new file mode 100644 index 0000000000..c8e798d307 --- /dev/null +++ b/tmt/tests/tests/test-52-install-repart.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test bootc install to-disk with systemd-repart partitioning +duration: 30m +test: nu booted/test-install-repart.nu diff --git a/tmt/tests/tests/test-57-composefs-separate-boot.fmf b/tmt/tests/tests/test-57-composefs-separate-boot.fmf new file mode 100644 index 0000000000..c2ffb8db5c --- /dev/null +++ b/tmt/tests/tests/test-57-composefs-separate-boot.fmf @@ -0,0 +1,9 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test composefs with GRUB and a separate /boot partition +duration: 60m +require: +- dosfstools +- e2fsprogs +test: nu booted/test-composefs-separate-boot.nu diff --git a/tmt/tests/tests/test-60-install-composefs-native.fmf b/tmt/tests/tests/test-60-install-composefs-native.fmf new file mode 100644 index 0000000000..582a5f9833 --- /dev/null +++ b/tmt/tests/tests/test-60-install-composefs-native.fmf @@ -0,0 +1,6 @@ +# THIS IS GENERATED CODE - DO NOT EDIT +# Generated by: cargo xtask tmt + +summary: Test that composefs-native images default to the composefs backend +duration: 45m +test: nu booted/test-install-composefs-native.nu From 2acec7492dfa3d769eac8c33b95cdc2df9814c9a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 3 Oct 2026 04:51:21 -0400 Subject: [PATCH 2/2] tmt: Identify tests and plans by name, not by number Each test file carried a `# number: N` header that became part of the test and plan names (test-50-foo, plan-50-foo) and the sort order. The number had to be unique by convention only, so every new test picked the next free one, and parallel pull requests regularly picked the same one; duplicates already exist on main. It carries no meaning: each plan runs in its own VM, so nothing depends on the order. Name tests and plans after the slug in the file name instead (test-, plan-) and drop the header. Test names must now be unique, which the generator checks. This is the mechanical part: the header lines are removed, the three scripts and three hand-written fmf files that still had a number in their name are renamed, the generated files are regenerated, and the docs that mention a number are updated. `just test-tmt ` matches substrings of the plan name as before, so existing invocations such as `just test-tmt readonly` keep working. Generated-by: AI Signed-off-by: Colin Walters --- crates/tests-integration/src/booted.rs | 2 +- .../src/booted/switch_zstd_chunked.rs | 1 - crates/xtask/src/tmt.rs | 109 +++++++----------- docs/src/bootc-composefs.7.md | 2 +- hack/provision-configure.sh | 2 +- tmt/bug-soft-reboot.md | 4 +- tmt/plans/integration.fmf | 2 +- ...an-33-bib-build.fmf => plan-bib-build.fmf} | 2 +- ...dge.fmf => plan-composefs-1-16-bridge.fmf} | 2 +- ...-composefs-corrupted-state-resilience.fmf} | 2 +- ...s-gc-uki.fmf => plan-composefs-gc-uki.fmf} | 2 +- ...composefs-gc.fmf => plan-composefs-gc.fmf} | 2 +- ...t.fmf => plan-composefs-separate-boot.fmf} | 2 +- ...le.fmf => plan-composefs-uki-dumpfile.fmf} | 2 +- ...icy.fmf => plan-custom-selinux-policy.fmf} | 2 +- ...itch.fmf => plan-download-only-switch.fmf} | 2 +- ...ade.fmf => plan-download-only-upgrade.fmf} | 2 +- ...nflict.fmf => plan-etc-merge-conflict.fmf} | 2 +- ...ctory-reset.fmf => plan-factory-reset.fmf} | 2 +- ...de.fmf => plan-image-pushpull-upgrade.fmf} | 2 +- ...boot.fmf => plan-image-upgrade-reboot.fmf} | 2 +- ...e.fmf => plan-install-bootloader-none.fmf} | 2 +- ....fmf => plan-install-composefs-native.fmf} | 2 +- ...elete.fmf => plan-install-karg-delete.fmf} | 2 +- ...t-dir.fmf => plan-install-no-boot-dir.fmf} | 2 +- ...fmf => plan-install-outside-container.fmf} | 2 +- ...all-repart.fmf => plan-install-repart.fmf} | 2 +- ... plan-install-to-filesystem-var-mount.fmf} | 2 +- ...flag.fmf => plan-install-unified-flag.fmf} | 2 +- ...rce.fmf => plan-loader-entries-source.fmf} | 2 +- ...l.fmf => plan-logically-bound-install.fmf} | 2 +- ...ch.fmf => plan-logically-bound-switch.fmf} | 2 +- ...vice-esp.fmf => plan-multi-device-esp.fmf} | 2 +- ...plan-01-readonly.fmf => plan-readonly.fmf} | 2 +- ...plan-36-rollback.fmf => plan-rollback.fmf} | 2 +- ...shadow-fixup.fmf => plan-shadow-fixup.fmf} | 2 +- ...mf => plan-soft-reboot-selinux-policy.fmf} | 2 +- ...5-soft-reboot.fmf => plan-soft-reboot.fmf} | 2 +- ...ce.fmf => plan-switch-mutate-in-place.fmf} | 2 +- ...digest.fmf => plan-switch-same-digest.fmf} | 2 +- ...unified.fmf => plan-switch-to-unified.fmf} | 2 +- ...unked.fmf => plan-switch-zstd-chunked.fmf} | 2 +- ...atus.fmf => plan-upgrade-check-status.fmf} | 2 +- ... => plan-upgrade-preflight-disk-check.fmf} | 2 +- ...9-upgrade-tag.fmf => plan-upgrade-tag.fmf} | 2 +- ...-34-user-agent.fmf => plan-user-agent.fmf} | 2 +- ...-23-usroverlay.fmf => plan-usroverlay.fmf} | 2 +- tmt/tests/booted/README.md | 15 +++ tmt/tests/booted/test-bib-build.nu | 1 - ...ridge.nu => test-composefs-1-16-bridge.nu} | 1 - ...st-composefs-corrupted-state-resilience.nu | 1 - tmt/tests/booted/test-composefs-gc-uki.nu | 1 - tmt/tests/booted/test-composefs-gc.nu | 1 - .../booted/test-composefs-separate-boot.nu | 1 - .../booted/test-composefs-uki-dumpfile.nu | 1 - .../booted/test-custom-selinux-policy.nu | 1 - tmt/tests/booted/test-download-only-switch.nu | 1 - .../booted/test-download-only-upgrade.nu | 1 - tmt/tests/booted/test-etc-merge-conflict.nu | 1 - tmt/tests/booted/test-factory-reset.nu | 3 +- .../booted/test-image-pushpull-upgrade.nu | 1 - tmt/tests/booted/test-image-upgrade-reboot.nu | 1 - .../booted/test-install-bootloader-none.nu | 1 - .../booted/test-install-composefs-native.nu | 1 - tmt/tests/booted/test-install-karg-delete.nu | 1 - tmt/tests/booted/test-install-no-boot-dir.nu | 1 - .../booted/test-install-outside-container.nu | 1 - tmt/tests/booted/test-install-repart.nu | 1 - .../test-install-to-filesystem-var-mount.sh | 1 - tmt/tests/booted/test-install-unified-flag.nu | 1 - .../booted/test-loader-entries-source.nu | 1 - .../booted/test-logically-bound-install.nu | 1 - .../booted/test-logically-bound-switch.nu | 1 - tmt/tests/booted/test-multi-device-esp.nu | 1 - .../{test-01-readonly.nu => test-readonly.nu} | 1 - tmt/tests/booted/test-rollback.nu | 1 - ...4-shadow-fixup.nu => test-shadow-fixup.nu} | 1 - .../booted/test-soft-reboot-selinux-policy.nu | 1 - tmt/tests/booted/test-soft-reboot.nu | 1 - .../booted/test-switch-mutate-in-place.nu | 1 - tmt/tests/booted/test-switch-same-digest.nu | 1 - tmt/tests/booted/test-switch-to-unified.nu | 1 - tmt/tests/booted/test-upgrade-check-status.nu | 1 - .../test-upgrade-preflight-disk-check.nu | 1 - tmt/tests/booted/test-upgrade-tag.nu | 1 - tmt/tests/booted/test-user-agent.py | 1 - tmt/tests/booted/test-usroverlay.nu | 1 - .../test-on-ostree/test-install-on-ostree.sh | 1 - ...flag.fmf => test-install-unified-flag.fmf} | 0 ...vice-esp.fmf => test-multi-device-esp.fmf} | 0 ...unified.fmf => test-switch-to-unified.fmf} | 0 ...st-33-bib-build.fmf => test-bib-build.fmf} | 0 ...dge.fmf => test-composefs-1-16-bridge.fmf} | 2 +- ...-composefs-corrupted-state-resilience.fmf} | 0 ...s-gc-uki.fmf => test-composefs-gc-uki.fmf} | 0 ...composefs-gc.fmf => test-composefs-gc.fmf} | 0 ...t.fmf => test-composefs-separate-boot.fmf} | 0 ...le.fmf => test-composefs-uki-dumpfile.fmf} | 0 ...icy.fmf => test-custom-selinux-policy.fmf} | 0 ...itch.fmf => test-download-only-switch.fmf} | 0 ...ade.fmf => test-download-only-upgrade.fmf} | 0 ...nflict.fmf => test-etc-merge-conflict.fmf} | 0 ...ctory-reset.fmf => test-factory-reset.fmf} | 0 ...de.fmf => test-image-pushpull-upgrade.fmf} | 0 ...boot.fmf => test-image-upgrade-reboot.fmf} | 0 ...e.fmf => test-install-bootloader-none.fmf} | 0 ....fmf => test-install-composefs-native.fmf} | 0 ...elete.fmf => test-install-karg-delete.fmf} | 0 ...t-dir.fmf => test-install-no-boot-dir.fmf} | 0 ...fmf => test-install-outside-container.fmf} | 0 ...all-repart.fmf => test-install-repart.fmf} | 0 ... test-install-to-filesystem-var-mount.fmf} | 0 ...flag.fmf => test-install-unified-flag.fmf} | 0 ...rce.fmf => test-loader-entries-source.fmf} | 0 ...l.fmf => test-logically-bound-install.fmf} | 0 ...ch.fmf => test-logically-bound-switch.fmf} | 0 ...vice-esp.fmf => test-multi-device-esp.fmf} | 0 ...test-01-readonly.fmf => test-readonly.fmf} | 2 +- ...test-36-rollback.fmf => test-rollback.fmf} | 0 ...shadow-fixup.fmf => test-shadow-fixup.fmf} | 2 +- ...mf => test-soft-reboot-selinux-policy.fmf} | 0 ...5-soft-reboot.fmf => test-soft-reboot.fmf} | 0 ...ce.fmf => test-switch-mutate-in-place.fmf} | 0 ...digest.fmf => test-switch-same-digest.fmf} | 0 ...unified.fmf => test-switch-to-unified.fmf} | 0 ...unked.fmf => test-switch-zstd-chunked.fmf} | 0 ...atus.fmf => test-upgrade-check-status.fmf} | 0 ... => test-upgrade-preflight-disk-check.fmf} | 0 ...9-upgrade-tag.fmf => test-upgrade-tag.fmf} | 0 ...-34-user-agent.fmf => test-user-agent.fmf} | 0 ...-23-usroverlay.fmf => test-usroverlay.fmf} | 0 131 files changed, 107 insertions(+), 158 deletions(-) rename tmt/plans/integration/{plan-33-bib-build.fmf => plan-bib-build.fmf} (83%) rename tmt/plans/integration/{plan-49-composefs-1-16-bridge.fmf => plan-composefs-1-16-bridge.fmf} (85%) rename tmt/plans/integration/{plan-45-composefs-corrupted-state-resilience.fmf => plan-composefs-corrupted-state-resilience.fmf} (73%) rename tmt/plans/integration/{plan-41-composefs-gc-uki.fmf => plan-composefs-gc-uki.fmf} (78%) rename tmt/plans/integration/{plan-35-composefs-gc.fmf => plan-composefs-gc.fmf} (84%) rename tmt/plans/integration/{plan-57-composefs-separate-boot.fmf => plan-composefs-separate-boot.fmf} (80%) rename tmt/plans/integration/{plan-48-composefs-uki-dumpfile.fmf => plan-composefs-uki-dumpfile.fmf} (76%) rename tmt/plans/integration/{plan-27-custom-selinux-policy.fmf => plan-custom-selinux-policy.fmf} (85%) rename tmt/plans/integration/{plan-47-download-only-switch.fmf => plan-download-only-switch.fmf} (73%) rename tmt/plans/integration/{plan-26-download-only-upgrade.fmf => plan-download-only-upgrade.fmf} (73%) rename tmt/plans/integration/{plan-46-etc-merge-conflict.fmf => plan-etc-merge-conflict.fmf} (80%) rename tmt/plans/integration/{plan-28-factory-reset.fmf => plan-factory-reset.fmf} (79%) rename tmt/plans/integration/{plan-20-image-pushpull-upgrade.fmf => plan-image-pushpull-upgrade.fmf} (71%) rename tmt/plans/integration/{plan-24-image-upgrade-reboot.fmf => plan-image-upgrade-reboot.fmf} (88%) rename tmt/plans/integration/{plan-38-install-bootloader-none.fmf => plan-install-bootloader-none.fmf} (77%) rename tmt/plans/integration/{plan-60-install-composefs-native.fmf => plan-install-composefs-native.fmf} (78%) rename tmt/plans/integration/{plan-40-install-karg-delete.fmf => plan-install-karg-delete.fmf} (77%) rename tmt/plans/integration/{plan-37-install-no-boot-dir.fmf => plan-install-no-boot-dir.fmf} (79%) rename tmt/plans/integration/{plan-23-install-outside-container.fmf => plan-install-outside-container.fmf} (73%) rename tmt/plans/integration/{plan-52-install-repart.fmf => plan-install-repart.fmf} (78%) rename tmt/plans/integration/{plan-32-install-to-filesystem-var-mount.fmf => plan-install-to-filesystem-var-mount.fmf} (72%) rename tmt/plans/integration/{plan-30-install-unified-flag.fmf => plan-install-unified-flag.fmf} (79%) rename tmt/plans/integration/{plan-42-loader-entries-source.fmf => plan-loader-entries-source.fmf} (78%) rename tmt/plans/integration/{plan-22-logically-bound-install.fmf => plan-logically-bound-install.fmf} (78%) rename tmt/plans/integration/{plan-21-logically-bound-switch.fmf => plan-logically-bound-switch.fmf} (79%) rename tmt/plans/integration/{plan-32-multi-device-esp.fmf => plan-multi-device-esp.fmf} (77%) rename tmt/plans/integration/{plan-01-readonly.fmf => plan-readonly.fmf} (82%) rename tmt/plans/integration/{plan-36-rollback.fmf => plan-rollback.fmf} (78%) rename tmt/plans/integration/{plan-44-shadow-fixup.fmf => plan-shadow-fixup.fmf} (81%) rename tmt/plans/integration/{plan-29-soft-reboot-selinux-policy.fmf => plan-soft-reboot-selinux-policy.fmf} (76%) rename tmt/plans/integration/{plan-25-soft-reboot.fmf => plan-soft-reboot.fmf} (75%) rename tmt/plans/integration/{plan-31-switch-mutate-in-place.fmf => plan-switch-mutate-in-place.fmf} (76%) rename tmt/plans/integration/{plan-43-switch-same-digest.fmf => plan-switch-same-digest.fmf} (80%) rename tmt/plans/integration/{plan-31-switch-to-unified.fmf => plan-switch-to-unified.fmf} (81%) rename tmt/plans/integration/{plan-50-switch-zstd-chunked.fmf => plan-switch-zstd-chunked.fmf} (86%) rename tmt/plans/integration/{plan-37-upgrade-check-status.fmf => plan-upgrade-check-status.fmf} (79%) rename tmt/plans/integration/{plan-35-upgrade-preflight-disk-check.fmf => plan-upgrade-preflight-disk-check.fmf} (75%) rename tmt/plans/integration/{plan-39-upgrade-tag.fmf => plan-upgrade-tag.fmf} (80%) rename tmt/plans/integration/{plan-34-user-agent.fmf => plan-user-agent.fmf} (80%) rename tmt/plans/integration/{plan-23-usroverlay.fmf => plan-usroverlay.fmf} (77%) rename tmt/tests/booted/{test-49-composefs-1-16-bridge.nu => test-composefs-1-16-bridge.nu} (99%) rename tmt/tests/booted/{test-01-readonly.nu => test-readonly.nu} (98%) rename tmt/tests/booted/{test-44-shadow-fixup.nu => test-shadow-fixup.nu} (99%) rename tmt/tests/{test-30-install-unified-flag.fmf => test-install-unified-flag.fmf} (100%) rename tmt/tests/{test-32-multi-device-esp.fmf => test-multi-device-esp.fmf} (100%) rename tmt/tests/{test-31-switch-to-unified.fmf => test-switch-to-unified.fmf} (100%) rename tmt/tests/tests/{test-33-bib-build.fmf => test-bib-build.fmf} (100%) rename tmt/tests/tests/{test-49-composefs-1-16-bridge.fmf => test-composefs-1-16-bridge.fmf} (82%) rename tmt/tests/tests/{test-45-composefs-corrupted-state-resilience.fmf => test-composefs-corrupted-state-resilience.fmf} (100%) rename tmt/tests/tests/{test-41-composefs-gc-uki.fmf => test-composefs-gc-uki.fmf} (100%) rename tmt/tests/tests/{test-35-composefs-gc.fmf => test-composefs-gc.fmf} (100%) rename tmt/tests/tests/{test-57-composefs-separate-boot.fmf => test-composefs-separate-boot.fmf} (100%) rename tmt/tests/tests/{test-48-composefs-uki-dumpfile.fmf => test-composefs-uki-dumpfile.fmf} (100%) rename tmt/tests/tests/{test-27-custom-selinux-policy.fmf => test-custom-selinux-policy.fmf} (100%) rename tmt/tests/tests/{test-47-download-only-switch.fmf => test-download-only-switch.fmf} (100%) rename tmt/tests/tests/{test-26-download-only-upgrade.fmf => test-download-only-upgrade.fmf} (100%) rename tmt/tests/tests/{test-46-etc-merge-conflict.fmf => test-etc-merge-conflict.fmf} (100%) rename tmt/tests/tests/{test-28-factory-reset.fmf => test-factory-reset.fmf} (100%) rename tmt/tests/tests/{test-20-image-pushpull-upgrade.fmf => test-image-pushpull-upgrade.fmf} (100%) rename tmt/tests/tests/{test-24-image-upgrade-reboot.fmf => test-image-upgrade-reboot.fmf} (100%) rename tmt/tests/tests/{test-38-install-bootloader-none.fmf => test-install-bootloader-none.fmf} (100%) rename tmt/tests/tests/{test-60-install-composefs-native.fmf => test-install-composefs-native.fmf} (100%) rename tmt/tests/tests/{test-40-install-karg-delete.fmf => test-install-karg-delete.fmf} (100%) rename tmt/tests/tests/{test-37-install-no-boot-dir.fmf => test-install-no-boot-dir.fmf} (100%) rename tmt/tests/tests/{test-23-install-outside-container.fmf => test-install-outside-container.fmf} (100%) rename tmt/tests/tests/{test-52-install-repart.fmf => test-install-repart.fmf} (100%) rename tmt/tests/tests/{test-32-install-to-filesystem-var-mount.fmf => test-install-to-filesystem-var-mount.fmf} (100%) rename tmt/tests/tests/{test-30-install-unified-flag.fmf => test-install-unified-flag.fmf} (100%) rename tmt/tests/tests/{test-42-loader-entries-source.fmf => test-loader-entries-source.fmf} (100%) rename tmt/tests/tests/{test-22-logically-bound-install.fmf => test-logically-bound-install.fmf} (100%) rename tmt/tests/tests/{test-21-logically-bound-switch.fmf => test-logically-bound-switch.fmf} (100%) rename tmt/tests/tests/{test-32-multi-device-esp.fmf => test-multi-device-esp.fmf} (100%) rename tmt/tests/tests/{test-01-readonly.fmf => test-readonly.fmf} (79%) rename tmt/tests/tests/{test-36-rollback.fmf => test-rollback.fmf} (100%) rename tmt/tests/tests/{test-44-shadow-fixup.fmf => test-shadow-fixup.fmf} (81%) rename tmt/tests/tests/{test-29-soft-reboot-selinux-policy.fmf => test-soft-reboot-selinux-policy.fmf} (100%) rename tmt/tests/tests/{test-25-soft-reboot.fmf => test-soft-reboot.fmf} (100%) rename tmt/tests/tests/{test-31-switch-mutate-in-place.fmf => test-switch-mutate-in-place.fmf} (100%) rename tmt/tests/tests/{test-43-switch-same-digest.fmf => test-switch-same-digest.fmf} (100%) rename tmt/tests/tests/{test-31-switch-to-unified.fmf => test-switch-to-unified.fmf} (100%) rename tmt/tests/tests/{test-50-switch-zstd-chunked.fmf => test-switch-zstd-chunked.fmf} (100%) rename tmt/tests/tests/{test-37-upgrade-check-status.fmf => test-upgrade-check-status.fmf} (100%) rename tmt/tests/tests/{test-35-upgrade-preflight-disk-check.fmf => test-upgrade-preflight-disk-check.fmf} (100%) rename tmt/tests/tests/{test-39-upgrade-tag.fmf => test-upgrade-tag.fmf} (100%) rename tmt/tests/tests/{test-34-user-agent.fmf => test-user-agent.fmf} (100%) rename tmt/tests/tests/{test-23-usroverlay.fmf => test-usroverlay.fmf} (100%) diff --git a/crates/tests-integration/src/booted.rs b/crates/tests-integration/src/booted.rs index ec75ce75f8..53c0774465 100644 --- a/crates/tests-integration/src/booted.rs +++ b/crates/tests-integration/src/booted.rs @@ -2,7 +2,7 @@ //! tmt/tests/booted; see . //! //! Each module in booted/ is one subcommand, and starts with the same -//! `number`, `tmt` and `extra` header (in `//` comments) that `cargo xtask +//! `tmt` and `extra` header (in `//` comments) that `cargo xtask //! update-generated` reads from the nushell tests to generate tmt/tests and //! tmt/plans. //! diff --git a/crates/tests-integration/src/booted/switch_zstd_chunked.rs b/crates/tests-integration/src/booted/switch_zstd_chunked.rs index 7e7b2e0065..a316bb7f84 100644 --- a/crates/tests-integration/src/booted/switch_zstd_chunked.rs +++ b/crates/tests-integration/src/booted/switch_zstd_chunked.rs @@ -1,4 +1,3 @@ -// number: 50 // tmt: // summary: Switch to an image with zstd:chunked compressed layers // duration: 30m diff --git a/crates/xtask/src/tmt.rs b/crates/xtask/src/tmt.rs index f7aabf34c9..ad42c13571 100644 --- a/crates/xtask/src/tmt.rs +++ b/crates/xtask/src/tmt.rs @@ -504,8 +504,8 @@ pub(crate) fn run_tmt(sh: &Shell, args: &RunTmtArgs) -> Result<()> { let plan_bcvk_opts = { let supports_bind_storage_ro = distro_supports_bind_storage_ro(&distro); - // Plan names from tmt are like /tmt/plans/integration/plan-01-readonly - // but metadata keys are like /plan-01-readonly, so match on suffix + // Plan names from tmt are like /tmt/plans/integration/plan-readonly + // but metadata keys are like /plan-readonly, so match on suffix let try_bind_storage = plan_metadata .iter() .find(|(key, _)| plan.ends_with(key.as_str())) @@ -903,16 +903,14 @@ pub(crate) fn tmt_provision(sh: &Shell, args: &TmtProvisionArgs) -> Result<()> { /// Parse tmt metadata from a test file whose line comments start with `comment` /// Looks for: -/// # number: N /// # extra: /// # try_bind_storage: true /// # tmt: /// # (yaml content) fn parse_tmt_metadata(content: &str, comment: &str) -> Result> { - let number_prefix = format!("{comment} number:"); let extra_marker = format!("{comment} extra:"); let tmt_marker = format!("{comment} tmt:"); - let mut number = None; + let mut found_tmt = false; let mut in_extra_block = false; let mut in_tmt_block = false; let mut extra_yaml_lines = Vec::new(); @@ -921,21 +919,12 @@ fn parse_tmt_metadata(content: &str, comment: &str) -> Result() - .context("Failed to parse number field")?, - ); - continue; - } - if trimmed == extra_marker { in_extra_block = true; in_tmt_block = false; continue; } else if trimmed == tmt_marker { + found_tmt = true; in_tmt_block = true; in_extra_block = false; continue; @@ -957,9 +946,9 @@ fn parse_tmt_metadata(content: &str, comment: &str) -> Result Result std::cmp::Ordering { - self.number - .cmp(&other.number) - .then_with(|| self.name.cmp(&other.name)) - } -} - -impl PartialOrd for TestDef { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - /// A generated file: its path relative to the repository root and contents. struct GeneratedFile { path: Utf8PathBuf, @@ -1179,18 +1153,6 @@ fn generate_integration() -> Result> { .with_context(|| format!("Parsing tmt metadata from {}", filename))? .with_context(|| format!("Missing tmt metadata in {}", filename))?; - // Remove number prefix if present (e.g., "01-readonly" -> "readonly", "26-examples-build" -> "examples-build") - let display_name = stem - .split_once('-') - .and_then(|(prefix, suffix)| { - if prefix.chars().all(|c| c.is_ascii_digit()) { - Some(suffix.to_string()) - } else { - None - } - }) - .unwrap_or_else(|| stem.to_string()); - // Determine test command based on file extension let test_command = if is_rust { format!("{RUST_TESTS_COMMAND} {stem}") @@ -1252,8 +1214,7 @@ fn generate_integration() -> Result> { .unwrap_or(false); tests.push(TestDef { - number: metadata.number, - name: display_name, + name: stem.to_string(), test_command, try_bind_storage, skip_if_composefs, @@ -1263,12 +1224,22 @@ fn generate_integration() -> Result> { }); } - tests.sort(); + // Plans run in separate VMs, so the order does not matter beyond being + // stable; names are the identity. + tests.sort_by(|a, b| a.name.cmp(&b.name)); + if let Some(dup) = tests.windows(2).find(|w| w[0].name == w[1].name) { + anyhow::bail!( + "Multiple tests named {}; test names must be unique across {} and {}", + dup[0].name, + booted_dir, + rust_dir + ); + } let mut generated = Vec::with_capacity(tests.len() * 2); for test in &tests { - let test_id = format!("test-{:02}-{}", test.number, test.name); - let plan_id = format!("plan-{:02}-{}", test.number, test.name); + let test_id = format!("test-{}", test.name); + let plan_id = format!("plan-{}", test.name); // The test: start with the tmt metadata (summary, duration, adjust, etc.) let mut test_value = if let serde_yaml::Value::Mapping(map) = &test.tmt { @@ -1376,8 +1347,7 @@ mod tests { #[test] fn test_parse_tmt_metadata_basic() { - let content = r#"# number: 1 -# tmt: + let content = r#"# tmt: # summary: Execute booted readonly/nondestructive tests # duration: 30m # @@ -1386,7 +1356,6 @@ use tap.nu "#; let metadata = parse_tmt_metadata(content, "#").unwrap().unwrap(); - assert_eq!(metadata.number, 1); // Verify tmt fields are captured let tmt = metadata.tmt.as_mapping().unwrap(); @@ -1404,8 +1373,7 @@ use tap.nu #[test] fn test_parse_tmt_metadata_with_adjust() { - let content = r#"# number: 27 -# tmt: + let content = r#"# tmt: # summary: Execute custom selinux policy test # duration: 30m # adjust: @@ -1417,7 +1385,6 @@ use std assert "#; let metadata = parse_tmt_metadata(content, "#").unwrap().unwrap(); - assert_eq!(metadata.number, 27); // Verify adjust section is in tmt let tmt = metadata.tmt.as_mapping().unwrap(); @@ -1435,9 +1402,22 @@ use std assert } #[test] - fn test_parse_tmt_metadata_shell_script() { - let content = r#"# number: 26 + fn test_parse_tmt_metadata_ignores_legacy_number() { + let content = r#"# number: 7 # tmt: +# summary: Header from before tests were identified by name +# duration: 30m +use std assert +"#; + + let metadata = parse_tmt_metadata(content, "#").unwrap().unwrap(); + let tmt = metadata.tmt.as_mapping().unwrap(); + assert_eq!(tmt.len(), 2); + } + + #[test] + fn test_parse_tmt_metadata_shell_script() { + let content = r#"# tmt: # summary: Test bootc examples build scripts # duration: 45m # adjust: @@ -1449,7 +1429,6 @@ set -eux "#; let metadata = parse_tmt_metadata(content, "#").unwrap().unwrap(); - assert_eq!(metadata.number, 26); let tmt = metadata.tmt.as_mapping().unwrap(); assert_eq!( @@ -1461,8 +1440,7 @@ set -eux #[test] fn test_parse_tmt_metadata_with_try_bind_storage() { - let content = r#"# number: 24 -# extra: + let content = r#"# extra: # try_bind_storage: true # tmt: # summary: Execute local upgrade tests @@ -1472,7 +1450,6 @@ use std assert "#; let metadata = parse_tmt_metadata(content, "#").unwrap().unwrap(); - assert_eq!(metadata.number, 24); let extra = metadata.extra.as_mapping().unwrap(); assert_eq!( @@ -1491,8 +1468,7 @@ use std assert #[test] fn test_parse_tmt_metadata_rust() { - let content = r#"// number: 50 -// tmt: + let content = r#"// tmt: // summary: Switch to an image with zstd:chunked compressed layers // extra: // skip_if_ostree: true @@ -1502,7 +1478,6 @@ use anyhow::Result; "#; let metadata = parse_tmt_metadata(content, "//").unwrap().unwrap(); - assert_eq!(metadata.number, 50); let extra = metadata.extra.as_mapping().unwrap(); assert_eq!( diff --git a/docs/src/bootc-composefs.7.md b/docs/src/bootc-composefs.7.md index 66c556c0c4..0aee078b39 100644 --- a/docs/src/bootc-composefs.7.md +++ b/docs/src/bootc-composefs.7.md @@ -88,7 +88,7 @@ the new initramfs boots it, and the next upgrade (now staged by the new bootc) moves the system to V1. bootc 1.16.4 and later already understand `composefs.digest=` and stage V1 directly. -The 1.16.0 path is covered by the `test-49-composefs-1-16-bridge` TMT test for +The 1.16.0 path is covered by the `test-composefs-1-16-bridge` TMT test for both sealed and `--allow-missing-verity` UKIs, including rollback and garbage collection. Upgrades of UKI installs from other releases are not yet tested. diff --git a/hack/provision-configure.sh b/hack/provision-configure.sh index f1ca4049a6..24383f1d72 100755 --- a/hack/provision-configure.sh +++ b/hack/provision-configure.sh @@ -103,7 +103,7 @@ fi # The following configs are skipped when SKIP_CONFIGS=1, which is used # for testing bootc install on Fedora CoreOS where these would conflict. if test -z "${SKIP_CONFIGS:-}"; then - # For test-22-logically-bound-install + # For test-logically-bound-install install -D -m 0644 -t /usr/share/containers/systemd/ lbi/* for x in curl.container curl-base.image podman.image; do ln -s /usr/share/containers/systemd/$x /usr/lib/bootc/bound-images.d/$x diff --git a/tmt/bug-soft-reboot.md b/tmt/bug-soft-reboot.md index eaef1df30f..66648236da 100644 --- a/tmt/bug-soft-reboot.md +++ b/tmt/bug-soft-reboot.md @@ -6,8 +6,8 @@ a systemd soft-reboot. See: -Note: This same issue affects Testing Farm as documented in `plans/integration.fmf` -where `test-27-custom-selinux-policy` is disabled for Packit (AWS) testing. +Note: This same issue affects Testing Farm as documented in the metadata of +`tests/booted/test-custom-selinux-policy.nu`, which disables that test for Packit (AWS) testing. ## Impact on bootc testing diff --git a/tmt/plans/integration.fmf b/tmt/plans/integration.fmf index ad82ecce59..1da4a4856d 100644 --- a/tmt/plans/integration.fmf +++ b/tmt/plans/integration.fmf @@ -18,7 +18,7 @@ prepare: - expect - ansible-core - zstd - # Required for test-32-install-to-filesystem-var-mount + # Required for test-install-to-filesystem-var-mount - parted - lvm2 - dosfstools diff --git a/tmt/plans/integration/plan-33-bib-build.fmf b/tmt/plans/integration/plan-bib-build.fmf similarity index 83% rename from tmt/plans/integration/plan-33-bib-build.fmf rename to tmt/plans/integration/plan-bib-build.fmf index 24f28c54d1..1751a81b66 100644 --- a/tmt/plans/integration/plan-33-bib-build.fmf +++ b/tmt/plans/integration/plan-bib-build.fmf @@ -5,5 +5,5 @@ summary: Test building a qcow2 disk image with bootc-image-builder discover: how: fmf test: - - /tmt/tests/tests/test-33-bib-build + - /tmt/tests/tests/test-bib-build extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-49-composefs-1-16-bridge.fmf b/tmt/plans/integration/plan-composefs-1-16-bridge.fmf similarity index 85% rename from tmt/plans/integration/plan-49-composefs-1-16-bridge.fmf rename to tmt/plans/integration/plan-composefs-1-16-bridge.fmf index 92cada768b..d02d7bf34f 100644 --- a/tmt/plans/integration/plan-49-composefs-1-16-bridge.fmf +++ b/tmt/plans/integration/plan-composefs-1-16-bridge.fmf @@ -6,7 +6,7 @@ enabled: false discover: how: fmf test: - - /tmt/tests/tests/test-49-composefs-1-16-bridge + - /tmt/tests/tests/test-composefs-1-16-bridge adjust: - when: composefs_bridge == true enabled: true diff --git a/tmt/plans/integration/plan-45-composefs-corrupted-state-resilience.fmf b/tmt/plans/integration/plan-composefs-corrupted-state-resilience.fmf similarity index 73% rename from tmt/plans/integration/plan-45-composefs-corrupted-state-resilience.fmf rename to tmt/plans/integration/plan-composefs-corrupted-state-resilience.fmf index e5fd427181..e26515e5f5 100644 --- a/tmt/plans/integration/plan-45-composefs-corrupted-state-resilience.fmf +++ b/tmt/plans/integration/plan-composefs-corrupted-state-resilience.fmf @@ -5,5 +5,5 @@ summary: Test composefs backend resilience to state corruption discover: how: fmf test: - - /tmt/tests/tests/test-45-composefs-corrupted-state-resilience + - /tmt/tests/tests/test-composefs-corrupted-state-resilience extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-41-composefs-gc-uki.fmf b/tmt/plans/integration/plan-composefs-gc-uki.fmf similarity index 78% rename from tmt/plans/integration/plan-41-composefs-gc-uki.fmf rename to tmt/plans/integration/plan-composefs-gc-uki.fmf index 14c58b15e2..0a820dc767 100644 --- a/tmt/plans/integration/plan-41-composefs-gc-uki.fmf +++ b/tmt/plans/integration/plan-composefs-gc-uki.fmf @@ -5,5 +5,5 @@ summary: Test composefs garbage collection for UKI discover: how: fmf test: - - /tmt/tests/tests/test-41-composefs-gc-uki + - /tmt/tests/tests/test-composefs-gc-uki extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-35-composefs-gc.fmf b/tmt/plans/integration/plan-composefs-gc.fmf similarity index 84% rename from tmt/plans/integration/plan-35-composefs-gc.fmf rename to tmt/plans/integration/plan-composefs-gc.fmf index db6ef00764..0efb6532af 100644 --- a/tmt/plans/integration/plan-35-composefs-gc.fmf +++ b/tmt/plans/integration/plan-composefs-gc.fmf @@ -5,6 +5,6 @@ summary: Test composefs garbage collection with same and different kernel+initrd discover: how: fmf test: - - /tmt/tests/tests/test-35-composefs-gc + - /tmt/tests/tests/test-composefs-gc extra-skip_if_ostree: true extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-57-composefs-separate-boot.fmf b/tmt/plans/integration/plan-composefs-separate-boot.fmf similarity index 80% rename from tmt/plans/integration/plan-57-composefs-separate-boot.fmf rename to tmt/plans/integration/plan-composefs-separate-boot.fmf index b402218302..c5772f4fbd 100644 --- a/tmt/plans/integration/plan-57-composefs-separate-boot.fmf +++ b/tmt/plans/integration/plan-composefs-separate-boot.fmf @@ -5,6 +5,6 @@ summary: Test composefs with GRUB and a separate /boot partition discover: how: fmf test: - - /tmt/tests/tests/test-57-composefs-separate-boot + - /tmt/tests/tests/test-composefs-separate-boot extra-skip_if_ostree: true extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-48-composefs-uki-dumpfile.fmf b/tmt/plans/integration/plan-composefs-uki-dumpfile.fmf similarity index 76% rename from tmt/plans/integration/plan-48-composefs-uki-dumpfile.fmf rename to tmt/plans/integration/plan-composefs-uki-dumpfile.fmf index da6513ed2e..b821799018 100644 --- a/tmt/plans/integration/plan-48-composefs-uki-dumpfile.fmf +++ b/tmt/plans/integration/plan-composefs-uki-dumpfile.fmf @@ -5,5 +5,5 @@ summary: Test composefs UKI dumpfile diff print discover: how: fmf test: - - /tmt/tests/tests/test-48-composefs-uki-dumpfile + - /tmt/tests/tests/test-composefs-uki-dumpfile extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-27-custom-selinux-policy.fmf b/tmt/plans/integration/plan-custom-selinux-policy.fmf similarity index 85% rename from tmt/plans/integration/plan-27-custom-selinux-policy.fmf rename to tmt/plans/integration/plan-custom-selinux-policy.fmf index 2d6eacfce1..8ad11f6394 100644 --- a/tmt/plans/integration/plan-27-custom-selinux-policy.fmf +++ b/tmt/plans/integration/plan-custom-selinux-policy.fmf @@ -5,7 +5,7 @@ summary: Execute custom selinux policy test discover: how: fmf test: - - /tmt/tests/tests/test-27-custom-selinux-policy + - /tmt/tests/tests/test-custom-selinux-policy adjust: - when: running_env != image_mode enabled: false diff --git a/tmt/plans/integration/plan-47-download-only-switch.fmf b/tmt/plans/integration/plan-download-only-switch.fmf similarity index 73% rename from tmt/plans/integration/plan-47-download-only-switch.fmf rename to tmt/plans/integration/plan-download-only-switch.fmf index 5e17aeb655..8232a1875a 100644 --- a/tmt/plans/integration/plan-47-download-only-switch.fmf +++ b/tmt/plans/integration/plan-download-only-switch.fmf @@ -5,4 +5,4 @@ summary: Execute download-only switch tests discover: how: fmf test: - - /tmt/tests/tests/test-47-download-only-switch + - /tmt/tests/tests/test-download-only-switch diff --git a/tmt/plans/integration/plan-26-download-only-upgrade.fmf b/tmt/plans/integration/plan-download-only-upgrade.fmf similarity index 73% rename from tmt/plans/integration/plan-26-download-only-upgrade.fmf rename to tmt/plans/integration/plan-download-only-upgrade.fmf index 2b8b48edd6..a43fe2aaa6 100644 --- a/tmt/plans/integration/plan-26-download-only-upgrade.fmf +++ b/tmt/plans/integration/plan-download-only-upgrade.fmf @@ -5,4 +5,4 @@ summary: Execute download-only upgrade tests discover: how: fmf test: - - /tmt/tests/tests/test-26-download-only-upgrade + - /tmt/tests/tests/test-download-only-upgrade diff --git a/tmt/plans/integration/plan-46-etc-merge-conflict.fmf b/tmt/plans/integration/plan-etc-merge-conflict.fmf similarity index 80% rename from tmt/plans/integration/plan-46-etc-merge-conflict.fmf rename to tmt/plans/integration/plan-etc-merge-conflict.fmf index e08d07577e..34441e057f 100644 --- a/tmt/plans/integration/plan-46-etc-merge-conflict.fmf +++ b/tmt/plans/integration/plan-etc-merge-conflict.fmf @@ -5,5 +5,5 @@ summary: Verify etc merge conflicts are caught during upgrade, not finalization discover: how: fmf test: - - /tmt/tests/tests/test-46-etc-merge-conflict + - /tmt/tests/tests/test-etc-merge-conflict extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-28-factory-reset.fmf b/tmt/plans/integration/plan-factory-reset.fmf similarity index 79% rename from tmt/plans/integration/plan-28-factory-reset.fmf rename to tmt/plans/integration/plan-factory-reset.fmf index 571c68176a..8f66897b67 100644 --- a/tmt/plans/integration/plan-28-factory-reset.fmf +++ b/tmt/plans/integration/plan-factory-reset.fmf @@ -5,5 +5,5 @@ summary: Execute factory reset tests discover: how: fmf test: - - /tmt/tests/tests/test-28-factory-reset + - /tmt/tests/tests/test-factory-reset extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-20-image-pushpull-upgrade.fmf b/tmt/plans/integration/plan-image-pushpull-upgrade.fmf similarity index 71% rename from tmt/plans/integration/plan-20-image-pushpull-upgrade.fmf rename to tmt/plans/integration/plan-image-pushpull-upgrade.fmf index 24d5096027..5a8a6b11d4 100644 --- a/tmt/plans/integration/plan-20-image-pushpull-upgrade.fmf +++ b/tmt/plans/integration/plan-image-pushpull-upgrade.fmf @@ -5,4 +5,4 @@ summary: Execute local upgrade tests discover: how: fmf test: - - /tmt/tests/tests/test-20-image-pushpull-upgrade + - /tmt/tests/tests/test-image-pushpull-upgrade diff --git a/tmt/plans/integration/plan-24-image-upgrade-reboot.fmf b/tmt/plans/integration/plan-image-upgrade-reboot.fmf similarity index 88% rename from tmt/plans/integration/plan-24-image-upgrade-reboot.fmf rename to tmt/plans/integration/plan-image-upgrade-reboot.fmf index 9c841daa25..f5191761b5 100644 --- a/tmt/plans/integration/plan-24-image-upgrade-reboot.fmf +++ b/tmt/plans/integration/plan-image-upgrade-reboot.fmf @@ -5,7 +5,7 @@ summary: Execute local upgrade tests discover: how: fmf test: - - /tmt/tests/tests/test-24-image-upgrade-reboot + - /tmt/tests/tests/test-image-upgrade-reboot adjust: - when: distro == centos-9 and boot_type == uki and seal_state == sealed enabled: false diff --git a/tmt/plans/integration/plan-38-install-bootloader-none.fmf b/tmt/plans/integration/plan-install-bootloader-none.fmf similarity index 77% rename from tmt/plans/integration/plan-38-install-bootloader-none.fmf rename to tmt/plans/integration/plan-install-bootloader-none.fmf index b3240f5eb5..7c1364beba 100644 --- a/tmt/plans/integration/plan-38-install-bootloader-none.fmf +++ b/tmt/plans/integration/plan-install-bootloader-none.fmf @@ -5,5 +5,5 @@ summary: Test bootc install with --bootloader=none discover: how: fmf test: - - /tmt/tests/tests/test-38-install-bootloader-none + - /tmt/tests/tests/test-install-bootloader-none extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-60-install-composefs-native.fmf b/tmt/plans/integration/plan-install-composefs-native.fmf similarity index 78% rename from tmt/plans/integration/plan-60-install-composefs-native.fmf rename to tmt/plans/integration/plan-install-composefs-native.fmf index 082a22caf3..cfdaa92640 100644 --- a/tmt/plans/integration/plan-60-install-composefs-native.fmf +++ b/tmt/plans/integration/plan-install-composefs-native.fmf @@ -5,5 +5,5 @@ summary: Test that composefs-native images default to the composefs backend discover: how: fmf test: - - /tmt/tests/tests/test-60-install-composefs-native + - /tmt/tests/tests/test-install-composefs-native extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-40-install-karg-delete.fmf b/tmt/plans/integration/plan-install-karg-delete.fmf similarity index 77% rename from tmt/plans/integration/plan-40-install-karg-delete.fmf rename to tmt/plans/integration/plan-install-karg-delete.fmf index fe0c1c1f17..41d4e7112c 100644 --- a/tmt/plans/integration/plan-40-install-karg-delete.fmf +++ b/tmt/plans/integration/plan-install-karg-delete.fmf @@ -5,5 +5,5 @@ summary: Test bootc install --karg-delete discover: how: fmf test: - - /tmt/tests/tests/test-40-install-karg-delete + - /tmt/tests/tests/test-install-karg-delete extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-37-install-no-boot-dir.fmf b/tmt/plans/integration/plan-install-no-boot-dir.fmf similarity index 79% rename from tmt/plans/integration/plan-37-install-no-boot-dir.fmf rename to tmt/plans/integration/plan-install-no-boot-dir.fmf index bfbaf6c8be..fd336b12ba 100644 --- a/tmt/plans/integration/plan-37-install-no-boot-dir.fmf +++ b/tmt/plans/integration/plan-install-no-boot-dir.fmf @@ -5,5 +5,5 @@ summary: Test bootc install to-filesystem without /boot directory discover: how: fmf test: - - /tmt/tests/tests/test-37-install-no-boot-dir + - /tmt/tests/tests/test-install-no-boot-dir extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-23-install-outside-container.fmf b/tmt/plans/integration/plan-install-outside-container.fmf similarity index 73% rename from tmt/plans/integration/plan-23-install-outside-container.fmf rename to tmt/plans/integration/plan-install-outside-container.fmf index 0b093564a4..6a98c48c03 100644 --- a/tmt/plans/integration/plan-23-install-outside-container.fmf +++ b/tmt/plans/integration/plan-install-outside-container.fmf @@ -5,4 +5,4 @@ summary: Execute tests for installing outside of a container discover: how: fmf test: - - /tmt/tests/tests/test-23-install-outside-container + - /tmt/tests/tests/test-install-outside-container diff --git a/tmt/plans/integration/plan-52-install-repart.fmf b/tmt/plans/integration/plan-install-repart.fmf similarity index 78% rename from tmt/plans/integration/plan-52-install-repart.fmf rename to tmt/plans/integration/plan-install-repart.fmf index 048f47c2a9..6fda712224 100644 --- a/tmt/plans/integration/plan-52-install-repart.fmf +++ b/tmt/plans/integration/plan-install-repart.fmf @@ -5,4 +5,4 @@ summary: Test bootc install to-disk with systemd-repart partitioning discover: how: fmf test: - - /tmt/tests/tests/test-52-install-repart + - /tmt/tests/tests/test-install-repart diff --git a/tmt/plans/integration/plan-32-install-to-filesystem-var-mount.fmf b/tmt/plans/integration/plan-install-to-filesystem-var-mount.fmf similarity index 72% rename from tmt/plans/integration/plan-32-install-to-filesystem-var-mount.fmf rename to tmt/plans/integration/plan-install-to-filesystem-var-mount.fmf index 1b3b84d4ab..a6008a4788 100644 --- a/tmt/plans/integration/plan-32-install-to-filesystem-var-mount.fmf +++ b/tmt/plans/integration/plan-install-to-filesystem-var-mount.fmf @@ -5,4 +5,4 @@ summary: Test bootc install to-filesystem with separate /var mount discover: how: fmf test: - - /tmt/tests/tests/test-32-install-to-filesystem-var-mount + - /tmt/tests/tests/test-install-to-filesystem-var-mount diff --git a/tmt/plans/integration/plan-30-install-unified-flag.fmf b/tmt/plans/integration/plan-install-unified-flag.fmf similarity index 79% rename from tmt/plans/integration/plan-30-install-unified-flag.fmf rename to tmt/plans/integration/plan-install-unified-flag.fmf index 1f95214cc0..3873413be2 100644 --- a/tmt/plans/integration/plan-30-install-unified-flag.fmf +++ b/tmt/plans/integration/plan-install-unified-flag.fmf @@ -5,5 +5,5 @@ summary: Test bootc install with experimental unified storage flag discover: how: fmf test: - - /tmt/tests/tests/test-30-install-unified-flag + - /tmt/tests/tests/test-install-unified-flag extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-42-loader-entries-source.fmf b/tmt/plans/integration/plan-loader-entries-source.fmf similarity index 78% rename from tmt/plans/integration/plan-42-loader-entries-source.fmf rename to tmt/plans/integration/plan-loader-entries-source.fmf index 334955af78..2f9163c673 100644 --- a/tmt/plans/integration/plan-42-loader-entries-source.fmf +++ b/tmt/plans/integration/plan-loader-entries-source.fmf @@ -5,5 +5,5 @@ summary: Test bootc loader-entries set-options-for-source discover: how: fmf test: - - /tmt/tests/tests/test-42-loader-entries-source + - /tmt/tests/tests/test-loader-entries-source extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-22-logically-bound-install.fmf b/tmt/plans/integration/plan-logically-bound-install.fmf similarity index 78% rename from tmt/plans/integration/plan-22-logically-bound-install.fmf rename to tmt/plans/integration/plan-logically-bound-install.fmf index e34c120b78..33bc2a7c9a 100644 --- a/tmt/plans/integration/plan-22-logically-bound-install.fmf +++ b/tmt/plans/integration/plan-logically-bound-install.fmf @@ -5,5 +5,5 @@ summary: Execute logically bound images tests for installing image discover: how: fmf test: - - /tmt/tests/tests/test-22-logically-bound-install + - /tmt/tests/tests/test-logically-bound-install extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-21-logically-bound-switch.fmf b/tmt/plans/integration/plan-logically-bound-switch.fmf similarity index 79% rename from tmt/plans/integration/plan-21-logically-bound-switch.fmf rename to tmt/plans/integration/plan-logically-bound-switch.fmf index 101af4b87d..ef43260da2 100644 --- a/tmt/plans/integration/plan-21-logically-bound-switch.fmf +++ b/tmt/plans/integration/plan-logically-bound-switch.fmf @@ -5,5 +5,5 @@ summary: Execute logically bound images tests for switching images discover: how: fmf test: - - /tmt/tests/tests/test-21-logically-bound-switch + - /tmt/tests/tests/test-logically-bound-switch extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-32-multi-device-esp.fmf b/tmt/plans/integration/plan-multi-device-esp.fmf similarity index 77% rename from tmt/plans/integration/plan-32-multi-device-esp.fmf rename to tmt/plans/integration/plan-multi-device-esp.fmf index 6d1f68a3f2..21655998af 100644 --- a/tmt/plans/integration/plan-32-multi-device-esp.fmf +++ b/tmt/plans/integration/plan-multi-device-esp.fmf @@ -5,4 +5,4 @@ summary: Test multi-device ESP detection for to-existing-root discover: how: fmf test: - - /tmt/tests/tests/test-32-multi-device-esp + - /tmt/tests/tests/test-multi-device-esp diff --git a/tmt/plans/integration/plan-01-readonly.fmf b/tmt/plans/integration/plan-readonly.fmf similarity index 82% rename from tmt/plans/integration/plan-01-readonly.fmf rename to tmt/plans/integration/plan-readonly.fmf index 0c35610928..9c5916e889 100644 --- a/tmt/plans/integration/plan-01-readonly.fmf +++ b/tmt/plans/integration/plan-readonly.fmf @@ -5,5 +5,5 @@ summary: Execute booted readonly/nondestructive tests discover: how: fmf test: - - /tmt/tests/tests/test-01-readonly + - /tmt/tests/tests/test-readonly extra-try_bind_storage: true diff --git a/tmt/plans/integration/plan-36-rollback.fmf b/tmt/plans/integration/plan-rollback.fmf similarity index 78% rename from tmt/plans/integration/plan-36-rollback.fmf rename to tmt/plans/integration/plan-rollback.fmf index d0c04f65c3..ae5a87c9c4 100644 --- a/tmt/plans/integration/plan-36-rollback.fmf +++ b/tmt/plans/integration/plan-rollback.fmf @@ -5,4 +5,4 @@ summary: Test bootc rollback functionality discover: how: fmf test: - - /tmt/tests/tests/test-36-rollback + - /tmt/tests/tests/test-rollback diff --git a/tmt/plans/integration/plan-44-shadow-fixup.fmf b/tmt/plans/integration/plan-shadow-fixup.fmf similarity index 81% rename from tmt/plans/integration/plan-44-shadow-fixup.fmf rename to tmt/plans/integration/plan-shadow-fixup.fmf index 7b9f71ce91..bcb0df48af 100644 --- a/tmt/plans/integration/plan-44-shadow-fixup.fmf +++ b/tmt/plans/integration/plan-shadow-fixup.fmf @@ -5,4 +5,4 @@ summary: Test bootc-sysusers-shadow-sync removes orphaned gshadow entries before discover: how: fmf test: - - /tmt/tests/tests/test-44-shadow-fixup + - /tmt/tests/tests/test-shadow-fixup diff --git a/tmt/plans/integration/plan-29-soft-reboot-selinux-policy.fmf b/tmt/plans/integration/plan-soft-reboot-selinux-policy.fmf similarity index 76% rename from tmt/plans/integration/plan-29-soft-reboot-selinux-policy.fmf rename to tmt/plans/integration/plan-soft-reboot-selinux-policy.fmf index e73de27e96..de0b214005 100644 --- a/tmt/plans/integration/plan-29-soft-reboot-selinux-policy.fmf +++ b/tmt/plans/integration/plan-soft-reboot-selinux-policy.fmf @@ -5,5 +5,5 @@ summary: Test soft reboot with SELinux policy changes discover: how: fmf test: - - /tmt/tests/tests/test-29-soft-reboot-selinux-policy + - /tmt/tests/tests/test-soft-reboot-selinux-policy extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-25-soft-reboot.fmf b/tmt/plans/integration/plan-soft-reboot.fmf similarity index 75% rename from tmt/plans/integration/plan-25-soft-reboot.fmf rename to tmt/plans/integration/plan-soft-reboot.fmf index 4227a88ff5..a4f6386388 100644 --- a/tmt/plans/integration/plan-25-soft-reboot.fmf +++ b/tmt/plans/integration/plan-soft-reboot.fmf @@ -5,4 +5,4 @@ summary: Execute soft reboot test discover: how: fmf test: - - /tmt/tests/tests/test-25-soft-reboot + - /tmt/tests/tests/test-soft-reboot diff --git a/tmt/plans/integration/plan-31-switch-mutate-in-place.fmf b/tmt/plans/integration/plan-switch-mutate-in-place.fmf similarity index 76% rename from tmt/plans/integration/plan-31-switch-mutate-in-place.fmf rename to tmt/plans/integration/plan-switch-mutate-in-place.fmf index 4d5db791e0..6c333446b7 100644 --- a/tmt/plans/integration/plan-31-switch-mutate-in-place.fmf +++ b/tmt/plans/integration/plan-switch-mutate-in-place.fmf @@ -5,5 +5,5 @@ summary: switch --mutate-in-place discover: how: fmf test: - - /tmt/tests/tests/test-31-switch-mutate-in-place + - /tmt/tests/tests/test-switch-mutate-in-place extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-43-switch-same-digest.fmf b/tmt/plans/integration/plan-switch-same-digest.fmf similarity index 80% rename from tmt/plans/integration/plan-43-switch-same-digest.fmf rename to tmt/plans/integration/plan-switch-same-digest.fmf index 630a852ff3..43e0743acc 100644 --- a/tmt/plans/integration/plan-43-switch-same-digest.fmf +++ b/tmt/plans/integration/plan-switch-same-digest.fmf @@ -5,5 +5,5 @@ summary: Error on bootc switch to image with identical fs-verity digest discover: how: fmf test: - - /tmt/tests/tests/test-43-switch-same-digest + - /tmt/tests/tests/test-switch-same-digest extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-31-switch-to-unified.fmf b/tmt/plans/integration/plan-switch-to-unified.fmf similarity index 81% rename from tmt/plans/integration/plan-31-switch-to-unified.fmf rename to tmt/plans/integration/plan-switch-to-unified.fmf index 04e1703a73..e91237972a 100644 --- a/tmt/plans/integration/plan-31-switch-to-unified.fmf +++ b/tmt/plans/integration/plan-switch-to-unified.fmf @@ -5,5 +5,5 @@ summary: Onboard to unified storage, build derived image, and switch to it discover: how: fmf test: - - /tmt/tests/tests/test-31-switch-to-unified + - /tmt/tests/tests/test-switch-to-unified extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-50-switch-zstd-chunked.fmf b/tmt/plans/integration/plan-switch-zstd-chunked.fmf similarity index 86% rename from tmt/plans/integration/plan-50-switch-zstd-chunked.fmf rename to tmt/plans/integration/plan-switch-zstd-chunked.fmf index 627ef98785..f0f8724aea 100644 --- a/tmt/plans/integration/plan-50-switch-zstd-chunked.fmf +++ b/tmt/plans/integration/plan-switch-zstd-chunked.fmf @@ -5,7 +5,7 @@ summary: Switch to an image with zstd:chunked compressed layers discover: how: fmf test: - - /tmt/tests/tests/test-50-switch-zstd-chunked + - /tmt/tests/tests/test-switch-zstd-chunked adjust: - when: running_env != image_mode enabled: false diff --git a/tmt/plans/integration/plan-37-upgrade-check-status.fmf b/tmt/plans/integration/plan-upgrade-check-status.fmf similarity index 79% rename from tmt/plans/integration/plan-37-upgrade-check-status.fmf rename to tmt/plans/integration/plan-upgrade-check-status.fmf index 59a63556ed..d86f54a70f 100644 --- a/tmt/plans/integration/plan-37-upgrade-check-status.fmf +++ b/tmt/plans/integration/plan-upgrade-check-status.fmf @@ -5,5 +5,5 @@ summary: Verify upgrade --check populates cached update in status discover: how: fmf test: - - /tmt/tests/tests/test-37-upgrade-check-status + - /tmt/tests/tests/test-upgrade-check-status extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-35-upgrade-preflight-disk-check.fmf b/tmt/plans/integration/plan-upgrade-preflight-disk-check.fmf similarity index 75% rename from tmt/plans/integration/plan-35-upgrade-preflight-disk-check.fmf rename to tmt/plans/integration/plan-upgrade-preflight-disk-check.fmf index d8b06d0361..a4bf3d5f34 100644 --- a/tmt/plans/integration/plan-35-upgrade-preflight-disk-check.fmf +++ b/tmt/plans/integration/plan-upgrade-preflight-disk-check.fmf @@ -5,4 +5,4 @@ summary: Verify pre-flight disk space check rejects images with inflated layer s discover: how: fmf test: - - /tmt/tests/tests/test-35-upgrade-preflight-disk-check + - /tmt/tests/tests/test-upgrade-preflight-disk-check diff --git a/tmt/plans/integration/plan-39-upgrade-tag.fmf b/tmt/plans/integration/plan-upgrade-tag.fmf similarity index 80% rename from tmt/plans/integration/plan-39-upgrade-tag.fmf rename to tmt/plans/integration/plan-upgrade-tag.fmf index 7d4b58e940..f9b0b0e2d1 100644 --- a/tmt/plans/integration/plan-39-upgrade-tag.fmf +++ b/tmt/plans/integration/plan-upgrade-tag.fmf @@ -5,4 +5,4 @@ summary: Test bootc upgrade --tag functionality with containers-storage discover: how: fmf test: - - /tmt/tests/tests/test-39-upgrade-tag + - /tmt/tests/tests/test-upgrade-tag diff --git a/tmt/plans/integration/plan-34-user-agent.fmf b/tmt/plans/integration/plan-user-agent.fmf similarity index 80% rename from tmt/plans/integration/plan-34-user-agent.fmf rename to tmt/plans/integration/plan-user-agent.fmf index 0961206067..4295dcf6eb 100644 --- a/tmt/plans/integration/plan-34-user-agent.fmf +++ b/tmt/plans/integration/plan-user-agent.fmf @@ -5,4 +5,4 @@ summary: Verify bootc sends correct User-Agent header to registries discover: how: fmf test: - - /tmt/tests/tests/test-34-user-agent + - /tmt/tests/tests/test-user-agent diff --git a/tmt/plans/integration/plan-23-usroverlay.fmf b/tmt/plans/integration/plan-usroverlay.fmf similarity index 77% rename from tmt/plans/integration/plan-23-usroverlay.fmf rename to tmt/plans/integration/plan-usroverlay.fmf index 6660b74dc0..99c7104df8 100644 --- a/tmt/plans/integration/plan-23-usroverlay.fmf +++ b/tmt/plans/integration/plan-usroverlay.fmf @@ -5,4 +5,4 @@ summary: Execute tests for bootc usrover discover: how: fmf test: - - /tmt/tests/tests/test-23-usroverlay + - /tmt/tests/tests/test-usroverlay diff --git a/tmt/tests/booted/README.md b/tmt/tests/booted/README.md index bc54513520..757060ef2f 100644 --- a/tmt/tests/booted/README.md +++ b/tmt/tests/booted/README.md @@ -2,6 +2,21 @@ These are intended to run via tmt. +## Adding a test + +Add `test-.nu` (or `.sh`, `.py`) here, starting with a `# tmt:` comment +block holding the tmt attributes (`summary`, `duration`, `adjust`, ...) as +YAML, optionally followed by an `# extra:` block of flags for `cargo xtask +run-tmt` (`try_bind_storage`, ...); see existing tests. Then run `just +update-generated`, which writes `tmt/tests/tests/test-.fmf` and +`tmt/plans/integration/plan-.fmf` for it. Tests are identified by their +name alone, with no number to pick, so changes adding tests don't conflict with +each other. `just test-tmt ` selects plans by substring of the plan name. + +A test written in Rust is instead a module of `crates/tests-integration/src/booted/`, +with the same header in `//` comments, named after the module (with `-` for +`_`). + ## Composefs EROFS V1/V2 regression coverage The existing `BOOTC_erofs_version` configuration selects the format while the diff --git a/tmt/tests/booted/test-bib-build.nu b/tmt/tests/booted/test-bib-build.nu index 765698204f..75eb85321d 100644 --- a/tmt/tests/booted/test-bib-build.nu +++ b/tmt/tests/booted/test-bib-build.nu @@ -1,4 +1,3 @@ -# number: 33 # tmt: # summary: Test building a qcow2 disk image with bootc-image-builder # duration: 45m diff --git a/tmt/tests/booted/test-49-composefs-1-16-bridge.nu b/tmt/tests/booted/test-composefs-1-16-bridge.nu similarity index 99% rename from tmt/tests/booted/test-49-composefs-1-16-bridge.nu rename to tmt/tests/booted/test-composefs-1-16-bridge.nu index 0f209313c2..b570eea47d 100644 --- a/tmt/tests/booted/test-49-composefs-1-16-bridge.nu +++ b/tmt/tests/booted/test-composefs-1-16-bridge.nu @@ -1,4 +1,3 @@ -# number: 49 # tmt: # summary: Test bootc 1.16 old-stager migration for sealed and unsealed UKIs # duration: 45m diff --git a/tmt/tests/booted/test-composefs-corrupted-state-resilience.nu b/tmt/tests/booted/test-composefs-corrupted-state-resilience.nu index 01d4d8424b..3accf2fef7 100644 --- a/tmt/tests/booted/test-composefs-corrupted-state-resilience.nu +++ b/tmt/tests/booted/test-composefs-corrupted-state-resilience.nu @@ -1,4 +1,3 @@ -# number: 45 # tmt: # summary: Test composefs backend resilience to state corruption # duration: 30m diff --git a/tmt/tests/booted/test-composefs-gc-uki.nu b/tmt/tests/booted/test-composefs-gc-uki.nu index 3ea7d0c245..6ddc76cc50 100644 --- a/tmt/tests/booted/test-composefs-gc-uki.nu +++ b/tmt/tests/booted/test-composefs-gc-uki.nu @@ -1,4 +1,3 @@ -# number: 41 # tmt: # summary: Test composefs garbage collection for UKI # duration: 30m diff --git a/tmt/tests/booted/test-composefs-gc.nu b/tmt/tests/booted/test-composefs-gc.nu index 659597c200..cae230ddc0 100644 --- a/tmt/tests/booted/test-composefs-gc.nu +++ b/tmt/tests/booted/test-composefs-gc.nu @@ -1,4 +1,3 @@ -# number: 35 # tmt: # summary: Test composefs garbage collection with same and different kernel+initrd # duration: 30m diff --git a/tmt/tests/booted/test-composefs-separate-boot.nu b/tmt/tests/booted/test-composefs-separate-boot.nu index 7bbe26f337..f0b9687ada 100644 --- a/tmt/tests/booted/test-composefs-separate-boot.nu +++ b/tmt/tests/booted/test-composefs-separate-boot.nu @@ -1,4 +1,3 @@ -# number: 57 # tmt: # summary: Test composefs with GRUB and a separate /boot partition # duration: 60m diff --git a/tmt/tests/booted/test-composefs-uki-dumpfile.nu b/tmt/tests/booted/test-composefs-uki-dumpfile.nu index a6c938e303..b11843c4da 100644 --- a/tmt/tests/booted/test-composefs-uki-dumpfile.nu +++ b/tmt/tests/booted/test-composefs-uki-dumpfile.nu @@ -1,4 +1,3 @@ -# number: 48 # tmt: # summary: Test composefs UKI dumpfile diff print # duration: 30m diff --git a/tmt/tests/booted/test-custom-selinux-policy.nu b/tmt/tests/booted/test-custom-selinux-policy.nu index 80f34be30d..33348f8051 100644 --- a/tmt/tests/booted/test-custom-selinux-policy.nu +++ b/tmt/tests/booted/test-custom-selinux-policy.nu @@ -1,4 +1,3 @@ -# number: 27 # tmt: # summary: Execute custom selinux policy test # duration: 30m diff --git a/tmt/tests/booted/test-download-only-switch.nu b/tmt/tests/booted/test-download-only-switch.nu index ca7aa2be2c..505a0095e0 100644 --- a/tmt/tests/booted/test-download-only-switch.nu +++ b/tmt/tests/booted/test-download-only-switch.nu @@ -1,4 +1,3 @@ -# number: 47 # tmt: # summary: Execute download-only switch tests # duration: 40m diff --git a/tmt/tests/booted/test-download-only-upgrade.nu b/tmt/tests/booted/test-download-only-upgrade.nu index 59dcdc3f5b..ff7c2e4dcd 100644 --- a/tmt/tests/booted/test-download-only-upgrade.nu +++ b/tmt/tests/booted/test-download-only-upgrade.nu @@ -1,4 +1,3 @@ -# number: 26 # tmt: # summary: Execute download-only upgrade tests # duration: 40m diff --git a/tmt/tests/booted/test-etc-merge-conflict.nu b/tmt/tests/booted/test-etc-merge-conflict.nu index d797fffdb1..b6f2d5cb68 100644 --- a/tmt/tests/booted/test-etc-merge-conflict.nu +++ b/tmt/tests/booted/test-etc-merge-conflict.nu @@ -1,4 +1,3 @@ -# number: 46 # tmt: # summary: Verify etc merge conflicts are caught during upgrade, not finalization # duration: 15m diff --git a/tmt/tests/booted/test-factory-reset.nu b/tmt/tests/booted/test-factory-reset.nu index 234d55ea7e..8a5fc49aa2 100644 --- a/tmt/tests/booted/test-factory-reset.nu +++ b/tmt/tests/booted/test-factory-reset.nu @@ -1,4 +1,3 @@ -# number: 28 # tmt: # summary: Execute factory reset tests # duration: 30m @@ -40,7 +39,7 @@ def initial_build [] { let new_stateroot_path = $"/sysroot/ostree/deploy/($new_stateroot)" # locate the workdir_root by looking backwards from a known static dir (TMT_PLAN_DATA) - # e.g. TMT_PLAN_DATA=/var/tmp/tmt/run-035/tmt/plans/integration/test-28-factory-reset/data + # e.g. TMT_PLAN_DATA=/var/tmp/tmt/run-035/tmt/plans/integration/plan-factory-reset/data let workdir_root = ($env.TMT_PLAN_DATA | path dirname | path dirname | path dirname | path dirname | path dirname | path dirname ) # make sure workdir_root's full path exists in new stateroot diff --git a/tmt/tests/booted/test-image-pushpull-upgrade.nu b/tmt/tests/booted/test-image-pushpull-upgrade.nu index 237cb3c3f1..efb3878b72 100644 --- a/tmt/tests/booted/test-image-pushpull-upgrade.nu +++ b/tmt/tests/booted/test-image-pushpull-upgrade.nu @@ -1,4 +1,3 @@ -# number: 20 # tmt: # summary: Execute local upgrade tests # duration: 30m diff --git a/tmt/tests/booted/test-image-upgrade-reboot.nu b/tmt/tests/booted/test-image-upgrade-reboot.nu index 94bb59f91c..b07b97b086 100644 --- a/tmt/tests/booted/test-image-upgrade-reboot.nu +++ b/tmt/tests/booted/test-image-upgrade-reboot.nu @@ -1,4 +1,3 @@ -# number: 24 # extra: # try_bind_storage: true # tmt: diff --git a/tmt/tests/booted/test-install-bootloader-none.nu b/tmt/tests/booted/test-install-bootloader-none.nu index ab36260e66..77efaee2d4 100644 --- a/tmt/tests/booted/test-install-bootloader-none.nu +++ b/tmt/tests/booted/test-install-bootloader-none.nu @@ -1,4 +1,3 @@ -# number: 38 # tmt: # summary: Test bootc install with --bootloader=none # duration: 30m diff --git a/tmt/tests/booted/test-install-composefs-native.nu b/tmt/tests/booted/test-install-composefs-native.nu index 1a96ef8c56..6af1b385a6 100644 --- a/tmt/tests/booted/test-install-composefs-native.nu +++ b/tmt/tests/booted/test-install-composefs-native.nu @@ -1,4 +1,3 @@ -# number: 60 # tmt: # summary: Test that composefs-native images default to the composefs backend # duration: 45m diff --git a/tmt/tests/booted/test-install-karg-delete.nu b/tmt/tests/booted/test-install-karg-delete.nu index ca9364333a..2dc803b19c 100644 --- a/tmt/tests/booted/test-install-karg-delete.nu +++ b/tmt/tests/booted/test-install-karg-delete.nu @@ -1,4 +1,3 @@ -# number: 40 # tmt: # summary: Test bootc install --karg-delete # duration: 30m diff --git a/tmt/tests/booted/test-install-no-boot-dir.nu b/tmt/tests/booted/test-install-no-boot-dir.nu index 82494abb50..1458e3db87 100644 --- a/tmt/tests/booted/test-install-no-boot-dir.nu +++ b/tmt/tests/booted/test-install-no-boot-dir.nu @@ -1,4 +1,3 @@ -# number: 37 # tmt: # summary: Test bootc install to-filesystem without /boot directory # duration: 30m diff --git a/tmt/tests/booted/test-install-outside-container.nu b/tmt/tests/booted/test-install-outside-container.nu index 71ad75c8e9..027bd93873 100644 --- a/tmt/tests/booted/test-install-outside-container.nu +++ b/tmt/tests/booted/test-install-outside-container.nu @@ -1,4 +1,3 @@ -# number: 23 # tmt: # summary: Execute tests for installing outside of a container # duration: 30m diff --git a/tmt/tests/booted/test-install-repart.nu b/tmt/tests/booted/test-install-repart.nu index 8d1c7f673d..53f8618b72 100644 --- a/tmt/tests/booted/test-install-repart.nu +++ b/tmt/tests/booted/test-install-repart.nu @@ -1,4 +1,3 @@ -# number: 52 # tmt: # summary: Test bootc install to-disk with systemd-repart partitioning # duration: 30m diff --git a/tmt/tests/booted/test-install-to-filesystem-var-mount.sh b/tmt/tests/booted/test-install-to-filesystem-var-mount.sh index 3953f6a9ee..a659fd6609 100644 --- a/tmt/tests/booted/test-install-to-filesystem-var-mount.sh +++ b/tmt/tests/booted/test-install-to-filesystem-var-mount.sh @@ -1,4 +1,3 @@ -# number: 32 # tmt: # summary: Test bootc install to-filesystem with separate /var mount # duration: 30m diff --git a/tmt/tests/booted/test-install-unified-flag.nu b/tmt/tests/booted/test-install-unified-flag.nu index e00ecb01ac..2f5bc7cd20 100644 --- a/tmt/tests/booted/test-install-unified-flag.nu +++ b/tmt/tests/booted/test-install-unified-flag.nu @@ -1,4 +1,3 @@ -# number: 30 # extra: # fixme_skip_if_composefs: true # tmt: diff --git a/tmt/tests/booted/test-loader-entries-source.nu b/tmt/tests/booted/test-loader-entries-source.nu index 423f80a97c..fe43de5901 100644 --- a/tmt/tests/booted/test-loader-entries-source.nu +++ b/tmt/tests/booted/test-loader-entries-source.nu @@ -1,4 +1,3 @@ -# number: 42 # extra: # fixme_skip_if_composefs: true # tmt: diff --git a/tmt/tests/booted/test-logically-bound-install.nu b/tmt/tests/booted/test-logically-bound-install.nu index d2c36fcbfc..e837d57a92 100644 --- a/tmt/tests/booted/test-logically-bound-install.nu +++ b/tmt/tests/booted/test-logically-bound-install.nu @@ -1,4 +1,3 @@ -# number: 22 # tmt: # summary: Execute logically bound images tests for installing image # duration: 30m diff --git a/tmt/tests/booted/test-logically-bound-switch.nu b/tmt/tests/booted/test-logically-bound-switch.nu index c756ca9d60..f78f5514d8 100644 --- a/tmt/tests/booted/test-logically-bound-switch.nu +++ b/tmt/tests/booted/test-logically-bound-switch.nu @@ -1,4 +1,3 @@ -# number: 21 # tmt: # summary: Execute logically bound images tests for switching images # duration: 30m diff --git a/tmt/tests/booted/test-multi-device-esp.nu b/tmt/tests/booted/test-multi-device-esp.nu index acf5bff4ff..a619257276 100644 --- a/tmt/tests/booted/test-multi-device-esp.nu +++ b/tmt/tests/booted/test-multi-device-esp.nu @@ -1,4 +1,3 @@ -# number: 32 # tmt: # summary: Test multi-device ESP detection for to-existing-root # duration: 60m diff --git a/tmt/tests/booted/test-01-readonly.nu b/tmt/tests/booted/test-readonly.nu similarity index 98% rename from tmt/tests/booted/test-01-readonly.nu rename to tmt/tests/booted/test-readonly.nu index d7662bddfc..6502a7317b 100644 --- a/tmt/tests/booted/test-01-readonly.nu +++ b/tmt/tests/booted/test-readonly.nu @@ -1,4 +1,3 @@ -# number: 1 # extra: # try_bind_storage: true # tmt: diff --git a/tmt/tests/booted/test-rollback.nu b/tmt/tests/booted/test-rollback.nu index 9e62810893..9523647c32 100644 --- a/tmt/tests/booted/test-rollback.nu +++ b/tmt/tests/booted/test-rollback.nu @@ -1,4 +1,3 @@ -# number: 36 # tmt: # summary: Test bootc rollback functionality # duration: 30m diff --git a/tmt/tests/booted/test-44-shadow-fixup.nu b/tmt/tests/booted/test-shadow-fixup.nu similarity index 99% rename from tmt/tests/booted/test-44-shadow-fixup.nu rename to tmt/tests/booted/test-shadow-fixup.nu index 34d088ec3d..d83647b73a 100644 --- a/tmt/tests/booted/test-44-shadow-fixup.nu +++ b/tmt/tests/booted/test-shadow-fixup.nu @@ -1,4 +1,3 @@ -# number: 44 # tmt: # summary: Test bootc-sysusers-shadow-sync removes orphaned gshadow entries before sysusers # duration: 30m diff --git a/tmt/tests/booted/test-soft-reboot-selinux-policy.nu b/tmt/tests/booted/test-soft-reboot-selinux-policy.nu index 1ebb11f177..9b86181673 100644 --- a/tmt/tests/booted/test-soft-reboot-selinux-policy.nu +++ b/tmt/tests/booted/test-soft-reboot-selinux-policy.nu @@ -1,4 +1,3 @@ -# number: 29 # tmt: # summary: Test soft reboot with SELinux policy changes # duration: 30m diff --git a/tmt/tests/booted/test-soft-reboot.nu b/tmt/tests/booted/test-soft-reboot.nu index 9be3fbcd5a..df8147672a 100644 --- a/tmt/tests/booted/test-soft-reboot.nu +++ b/tmt/tests/booted/test-soft-reboot.nu @@ -1,4 +1,3 @@ -# number: 25 # tmt: # summary: Execute soft reboot test # duration: 30m diff --git a/tmt/tests/booted/test-switch-mutate-in-place.nu b/tmt/tests/booted/test-switch-mutate-in-place.nu index 6740bd2381..593c896a9c 100644 --- a/tmt/tests/booted/test-switch-mutate-in-place.nu +++ b/tmt/tests/booted/test-switch-mutate-in-place.nu @@ -1,4 +1,3 @@ -# number: 31 # tmt: # summary: switch --mutate-in-place # duration: 30m diff --git a/tmt/tests/booted/test-switch-same-digest.nu b/tmt/tests/booted/test-switch-same-digest.nu index 012f247a7a..dd5c166e61 100644 --- a/tmt/tests/booted/test-switch-same-digest.nu +++ b/tmt/tests/booted/test-switch-same-digest.nu @@ -1,4 +1,3 @@ -# number: 43 # tmt: # summary: Error on bootc switch to image with identical fs-verity digest # duration: 10m diff --git a/tmt/tests/booted/test-switch-to-unified.nu b/tmt/tests/booted/test-switch-to-unified.nu index 4e8b61442e..8ae61751e5 100644 --- a/tmt/tests/booted/test-switch-to-unified.nu +++ b/tmt/tests/booted/test-switch-to-unified.nu @@ -1,4 +1,3 @@ -# number: 31 # tmt: # summary: Onboard to unified storage, build derived image, and switch to it # duration: 30m diff --git a/tmt/tests/booted/test-upgrade-check-status.nu b/tmt/tests/booted/test-upgrade-check-status.nu index bde2813c29..3da8058e3b 100644 --- a/tmt/tests/booted/test-upgrade-check-status.nu +++ b/tmt/tests/booted/test-upgrade-check-status.nu @@ -1,4 +1,3 @@ -# number: 37 # tmt: # summary: Verify upgrade --check populates cached update in status # duration: 30m diff --git a/tmt/tests/booted/test-upgrade-preflight-disk-check.nu b/tmt/tests/booted/test-upgrade-preflight-disk-check.nu index 0a084529d8..b31c0939d9 100644 --- a/tmt/tests/booted/test-upgrade-preflight-disk-check.nu +++ b/tmt/tests/booted/test-upgrade-preflight-disk-check.nu @@ -1,4 +1,3 @@ -# number: 35 # tmt: # summary: Verify pre-flight disk space check rejects images with inflated layer sizes # duration: 10m diff --git a/tmt/tests/booted/test-upgrade-tag.nu b/tmt/tests/booted/test-upgrade-tag.nu index 2125762c83..c6338ab6c2 100644 --- a/tmt/tests/booted/test-upgrade-tag.nu +++ b/tmt/tests/booted/test-upgrade-tag.nu @@ -1,4 +1,3 @@ -# number: 39 # tmt: # summary: Test bootc upgrade --tag functionality with containers-storage # duration: 30m diff --git a/tmt/tests/booted/test-user-agent.py b/tmt/tests/booted/test-user-agent.py index 3eedd9d4b5..c3a7fb91ea 100644 --- a/tmt/tests/booted/test-user-agent.py +++ b/tmt/tests/booted/test-user-agent.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# number: 34 # tmt: # summary: Verify bootc sends correct User-Agent header to registries # duration: 10m diff --git a/tmt/tests/booted/test-usroverlay.nu b/tmt/tests/booted/test-usroverlay.nu index ed406e3c3a..be280ab770 100644 --- a/tmt/tests/booted/test-usroverlay.nu +++ b/tmt/tests/booted/test-usroverlay.nu @@ -1,4 +1,3 @@ -# number: 23 # tmt: # summary: Execute tests for bootc usrover # duration: 30m diff --git a/tmt/tests/install/test-on-ostree/test-install-on-ostree.sh b/tmt/tests/install/test-on-ostree/test-install-on-ostree.sh index cf0f9fbed6..ac0b6c77ee 100644 --- a/tmt/tests/install/test-on-ostree/test-install-on-ostree.sh +++ b/tmt/tests/install/test-on-ostree/test-install-on-ostree.sh @@ -1,4 +1,3 @@ -# number: 50 # tmt: # summary: Test bootc install on ostree OS # duration: 30m diff --git a/tmt/tests/test-30-install-unified-flag.fmf b/tmt/tests/test-install-unified-flag.fmf similarity index 100% rename from tmt/tests/test-30-install-unified-flag.fmf rename to tmt/tests/test-install-unified-flag.fmf diff --git a/tmt/tests/test-32-multi-device-esp.fmf b/tmt/tests/test-multi-device-esp.fmf similarity index 100% rename from tmt/tests/test-32-multi-device-esp.fmf rename to tmt/tests/test-multi-device-esp.fmf diff --git a/tmt/tests/test-31-switch-to-unified.fmf b/tmt/tests/test-switch-to-unified.fmf similarity index 100% rename from tmt/tests/test-31-switch-to-unified.fmf rename to tmt/tests/test-switch-to-unified.fmf diff --git a/tmt/tests/tests/test-33-bib-build.fmf b/tmt/tests/tests/test-bib-build.fmf similarity index 100% rename from tmt/tests/tests/test-33-bib-build.fmf rename to tmt/tests/tests/test-bib-build.fmf diff --git a/tmt/tests/tests/test-49-composefs-1-16-bridge.fmf b/tmt/tests/tests/test-composefs-1-16-bridge.fmf similarity index 82% rename from tmt/tests/tests/test-49-composefs-1-16-bridge.fmf rename to tmt/tests/tests/test-composefs-1-16-bridge.fmf index 972a42f145..2eacc1c5f8 100644 --- a/tmt/tests/tests/test-49-composefs-1-16-bridge.fmf +++ b/tmt/tests/tests/test-composefs-1-16-bridge.fmf @@ -7,4 +7,4 @@ enabled: false adjust: - when: composefs_bridge == true enabled: true -test: nu booted/test-49-composefs-1-16-bridge.nu +test: nu booted/test-composefs-1-16-bridge.nu diff --git a/tmt/tests/tests/test-45-composefs-corrupted-state-resilience.fmf b/tmt/tests/tests/test-composefs-corrupted-state-resilience.fmf similarity index 100% rename from tmt/tests/tests/test-45-composefs-corrupted-state-resilience.fmf rename to tmt/tests/tests/test-composefs-corrupted-state-resilience.fmf diff --git a/tmt/tests/tests/test-41-composefs-gc-uki.fmf b/tmt/tests/tests/test-composefs-gc-uki.fmf similarity index 100% rename from tmt/tests/tests/test-41-composefs-gc-uki.fmf rename to tmt/tests/tests/test-composefs-gc-uki.fmf diff --git a/tmt/tests/tests/test-35-composefs-gc.fmf b/tmt/tests/tests/test-composefs-gc.fmf similarity index 100% rename from tmt/tests/tests/test-35-composefs-gc.fmf rename to tmt/tests/tests/test-composefs-gc.fmf diff --git a/tmt/tests/tests/test-57-composefs-separate-boot.fmf b/tmt/tests/tests/test-composefs-separate-boot.fmf similarity index 100% rename from tmt/tests/tests/test-57-composefs-separate-boot.fmf rename to tmt/tests/tests/test-composefs-separate-boot.fmf diff --git a/tmt/tests/tests/test-48-composefs-uki-dumpfile.fmf b/tmt/tests/tests/test-composefs-uki-dumpfile.fmf similarity index 100% rename from tmt/tests/tests/test-48-composefs-uki-dumpfile.fmf rename to tmt/tests/tests/test-composefs-uki-dumpfile.fmf diff --git a/tmt/tests/tests/test-27-custom-selinux-policy.fmf b/tmt/tests/tests/test-custom-selinux-policy.fmf similarity index 100% rename from tmt/tests/tests/test-27-custom-selinux-policy.fmf rename to tmt/tests/tests/test-custom-selinux-policy.fmf diff --git a/tmt/tests/tests/test-47-download-only-switch.fmf b/tmt/tests/tests/test-download-only-switch.fmf similarity index 100% rename from tmt/tests/tests/test-47-download-only-switch.fmf rename to tmt/tests/tests/test-download-only-switch.fmf diff --git a/tmt/tests/tests/test-26-download-only-upgrade.fmf b/tmt/tests/tests/test-download-only-upgrade.fmf similarity index 100% rename from tmt/tests/tests/test-26-download-only-upgrade.fmf rename to tmt/tests/tests/test-download-only-upgrade.fmf diff --git a/tmt/tests/tests/test-46-etc-merge-conflict.fmf b/tmt/tests/tests/test-etc-merge-conflict.fmf similarity index 100% rename from tmt/tests/tests/test-46-etc-merge-conflict.fmf rename to tmt/tests/tests/test-etc-merge-conflict.fmf diff --git a/tmt/tests/tests/test-28-factory-reset.fmf b/tmt/tests/tests/test-factory-reset.fmf similarity index 100% rename from tmt/tests/tests/test-28-factory-reset.fmf rename to tmt/tests/tests/test-factory-reset.fmf diff --git a/tmt/tests/tests/test-20-image-pushpull-upgrade.fmf b/tmt/tests/tests/test-image-pushpull-upgrade.fmf similarity index 100% rename from tmt/tests/tests/test-20-image-pushpull-upgrade.fmf rename to tmt/tests/tests/test-image-pushpull-upgrade.fmf diff --git a/tmt/tests/tests/test-24-image-upgrade-reboot.fmf b/tmt/tests/tests/test-image-upgrade-reboot.fmf similarity index 100% rename from tmt/tests/tests/test-24-image-upgrade-reboot.fmf rename to tmt/tests/tests/test-image-upgrade-reboot.fmf diff --git a/tmt/tests/tests/test-38-install-bootloader-none.fmf b/tmt/tests/tests/test-install-bootloader-none.fmf similarity index 100% rename from tmt/tests/tests/test-38-install-bootloader-none.fmf rename to tmt/tests/tests/test-install-bootloader-none.fmf diff --git a/tmt/tests/tests/test-60-install-composefs-native.fmf b/tmt/tests/tests/test-install-composefs-native.fmf similarity index 100% rename from tmt/tests/tests/test-60-install-composefs-native.fmf rename to tmt/tests/tests/test-install-composefs-native.fmf diff --git a/tmt/tests/tests/test-40-install-karg-delete.fmf b/tmt/tests/tests/test-install-karg-delete.fmf similarity index 100% rename from tmt/tests/tests/test-40-install-karg-delete.fmf rename to tmt/tests/tests/test-install-karg-delete.fmf diff --git a/tmt/tests/tests/test-37-install-no-boot-dir.fmf b/tmt/tests/tests/test-install-no-boot-dir.fmf similarity index 100% rename from tmt/tests/tests/test-37-install-no-boot-dir.fmf rename to tmt/tests/tests/test-install-no-boot-dir.fmf diff --git a/tmt/tests/tests/test-23-install-outside-container.fmf b/tmt/tests/tests/test-install-outside-container.fmf similarity index 100% rename from tmt/tests/tests/test-23-install-outside-container.fmf rename to tmt/tests/tests/test-install-outside-container.fmf diff --git a/tmt/tests/tests/test-52-install-repart.fmf b/tmt/tests/tests/test-install-repart.fmf similarity index 100% rename from tmt/tests/tests/test-52-install-repart.fmf rename to tmt/tests/tests/test-install-repart.fmf diff --git a/tmt/tests/tests/test-32-install-to-filesystem-var-mount.fmf b/tmt/tests/tests/test-install-to-filesystem-var-mount.fmf similarity index 100% rename from tmt/tests/tests/test-32-install-to-filesystem-var-mount.fmf rename to tmt/tests/tests/test-install-to-filesystem-var-mount.fmf diff --git a/tmt/tests/tests/test-30-install-unified-flag.fmf b/tmt/tests/tests/test-install-unified-flag.fmf similarity index 100% rename from tmt/tests/tests/test-30-install-unified-flag.fmf rename to tmt/tests/tests/test-install-unified-flag.fmf diff --git a/tmt/tests/tests/test-42-loader-entries-source.fmf b/tmt/tests/tests/test-loader-entries-source.fmf similarity index 100% rename from tmt/tests/tests/test-42-loader-entries-source.fmf rename to tmt/tests/tests/test-loader-entries-source.fmf diff --git a/tmt/tests/tests/test-22-logically-bound-install.fmf b/tmt/tests/tests/test-logically-bound-install.fmf similarity index 100% rename from tmt/tests/tests/test-22-logically-bound-install.fmf rename to tmt/tests/tests/test-logically-bound-install.fmf diff --git a/tmt/tests/tests/test-21-logically-bound-switch.fmf b/tmt/tests/tests/test-logically-bound-switch.fmf similarity index 100% rename from tmt/tests/tests/test-21-logically-bound-switch.fmf rename to tmt/tests/tests/test-logically-bound-switch.fmf diff --git a/tmt/tests/tests/test-32-multi-device-esp.fmf b/tmt/tests/tests/test-multi-device-esp.fmf similarity index 100% rename from tmt/tests/tests/test-32-multi-device-esp.fmf rename to tmt/tests/tests/test-multi-device-esp.fmf diff --git a/tmt/tests/tests/test-01-readonly.fmf b/tmt/tests/tests/test-readonly.fmf similarity index 79% rename from tmt/tests/tests/test-01-readonly.fmf rename to tmt/tests/tests/test-readonly.fmf index 2ed95c2ac5..2191ab8471 100644 --- a/tmt/tests/tests/test-01-readonly.fmf +++ b/tmt/tests/tests/test-readonly.fmf @@ -3,4 +3,4 @@ summary: Execute booted readonly/nondestructive tests duration: 30m -test: nu booted/test-01-readonly.nu +test: nu booted/test-readonly.nu diff --git a/tmt/tests/tests/test-36-rollback.fmf b/tmt/tests/tests/test-rollback.fmf similarity index 100% rename from tmt/tests/tests/test-36-rollback.fmf rename to tmt/tests/tests/test-rollback.fmf diff --git a/tmt/tests/tests/test-44-shadow-fixup.fmf b/tmt/tests/tests/test-shadow-fixup.fmf similarity index 81% rename from tmt/tests/tests/test-44-shadow-fixup.fmf rename to tmt/tests/tests/test-shadow-fixup.fmf index e2cb6965be..0e689fcb60 100644 --- a/tmt/tests/tests/test-44-shadow-fixup.fmf +++ b/tmt/tests/tests/test-shadow-fixup.fmf @@ -3,4 +3,4 @@ summary: Test bootc-sysusers-shadow-sync removes orphaned gshadow entries before sysusers duration: 30m -test: nu booted/test-44-shadow-fixup.nu +test: nu booted/test-shadow-fixup.nu diff --git a/tmt/tests/tests/test-29-soft-reboot-selinux-policy.fmf b/tmt/tests/tests/test-soft-reboot-selinux-policy.fmf similarity index 100% rename from tmt/tests/tests/test-29-soft-reboot-selinux-policy.fmf rename to tmt/tests/tests/test-soft-reboot-selinux-policy.fmf diff --git a/tmt/tests/tests/test-25-soft-reboot.fmf b/tmt/tests/tests/test-soft-reboot.fmf similarity index 100% rename from tmt/tests/tests/test-25-soft-reboot.fmf rename to tmt/tests/tests/test-soft-reboot.fmf diff --git a/tmt/tests/tests/test-31-switch-mutate-in-place.fmf b/tmt/tests/tests/test-switch-mutate-in-place.fmf similarity index 100% rename from tmt/tests/tests/test-31-switch-mutate-in-place.fmf rename to tmt/tests/tests/test-switch-mutate-in-place.fmf diff --git a/tmt/tests/tests/test-43-switch-same-digest.fmf b/tmt/tests/tests/test-switch-same-digest.fmf similarity index 100% rename from tmt/tests/tests/test-43-switch-same-digest.fmf rename to tmt/tests/tests/test-switch-same-digest.fmf diff --git a/tmt/tests/tests/test-31-switch-to-unified.fmf b/tmt/tests/tests/test-switch-to-unified.fmf similarity index 100% rename from tmt/tests/tests/test-31-switch-to-unified.fmf rename to tmt/tests/tests/test-switch-to-unified.fmf diff --git a/tmt/tests/tests/test-50-switch-zstd-chunked.fmf b/tmt/tests/tests/test-switch-zstd-chunked.fmf similarity index 100% rename from tmt/tests/tests/test-50-switch-zstd-chunked.fmf rename to tmt/tests/tests/test-switch-zstd-chunked.fmf diff --git a/tmt/tests/tests/test-37-upgrade-check-status.fmf b/tmt/tests/tests/test-upgrade-check-status.fmf similarity index 100% rename from tmt/tests/tests/test-37-upgrade-check-status.fmf rename to tmt/tests/tests/test-upgrade-check-status.fmf diff --git a/tmt/tests/tests/test-35-upgrade-preflight-disk-check.fmf b/tmt/tests/tests/test-upgrade-preflight-disk-check.fmf similarity index 100% rename from tmt/tests/tests/test-35-upgrade-preflight-disk-check.fmf rename to tmt/tests/tests/test-upgrade-preflight-disk-check.fmf diff --git a/tmt/tests/tests/test-39-upgrade-tag.fmf b/tmt/tests/tests/test-upgrade-tag.fmf similarity index 100% rename from tmt/tests/tests/test-39-upgrade-tag.fmf rename to tmt/tests/tests/test-upgrade-tag.fmf diff --git a/tmt/tests/tests/test-34-user-agent.fmf b/tmt/tests/tests/test-user-agent.fmf similarity index 100% rename from tmt/tests/tests/test-34-user-agent.fmf rename to tmt/tests/tests/test-user-agent.fmf diff --git a/tmt/tests/tests/test-23-usroverlay.fmf b/tmt/tests/tests/test-usroverlay.fmf similarity index 100% rename from tmt/tests/tests/test-23-usroverlay.fmf rename to tmt/tests/tests/test-usroverlay.fmf