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 dc98a343a2..ad42c13571 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..."); @@ -554,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())) @@ -953,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(); @@ -971,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; @@ -1007,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)) - } +/// A generated file: its path relative to the repository root and contents. +struct GeneratedFile { + path: Utf8PathBuf, + content: String, } -impl PartialOrd for TestDef { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) +/// 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![]; @@ -1184,18 +1153,6 @@ fn generate_integration() -> Result<(String, String)> { .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}") @@ -1257,8 +1214,7 @@ fn generate_integration() -> Result<(String, String)> { .unwrap_or(false); tests.push(TestDef { - number: metadata.number, - name: display_name, + name: stem.to_string(), test_command, try_bind_storage, skip_if_composefs, @@ -1268,16 +1224,24 @@ fn generate_integration() -> Result<(String, String)> { }); } - tests.sort(); - - // Generate single tests.fmf file using structured YAML + // 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 + ); + } - // 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-{}", test.name); + let plan_id = format!("plan-{}", 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 +1253,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 +1283,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 +1303,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)] @@ -1476,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 # @@ -1486,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(); @@ -1504,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: @@ -1517,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(); @@ -1535,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: @@ -1549,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!( @@ -1561,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 @@ -1572,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!( @@ -1591,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 @@ -1602,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 90e02dc28b..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 @@ -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-bib-build.fmf b/tmt/plans/integration/plan-bib-build.fmf new file mode 100644 index 0000000000..1751a81b66 --- /dev/null +++ b/tmt/plans/integration/plan-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-bib-build +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-composefs-1-16-bridge.fmf b/tmt/plans/integration/plan-composefs-1-16-bridge.fmf new file mode 100644 index 0000000000..d02d7bf34f --- /dev/null +++ b/tmt/plans/integration/plan-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-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-composefs-corrupted-state-resilience.fmf b/tmt/plans/integration/plan-composefs-corrupted-state-resilience.fmf new file mode 100644 index 0000000000..e26515e5f5 --- /dev/null +++ b/tmt/plans/integration/plan-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-composefs-corrupted-state-resilience +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-composefs-gc-uki.fmf b/tmt/plans/integration/plan-composefs-gc-uki.fmf new file mode 100644 index 0000000000..0a820dc767 --- /dev/null +++ b/tmt/plans/integration/plan-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-composefs-gc-uki +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-composefs-gc.fmf b/tmt/plans/integration/plan-composefs-gc.fmf new file mode 100644 index 0000000000..0efb6532af --- /dev/null +++ b/tmt/plans/integration/plan-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-composefs-gc +extra-skip_if_ostree: true +extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-composefs-separate-boot.fmf b/tmt/plans/integration/plan-composefs-separate-boot.fmf new file mode 100644 index 0000000000..c5772f4fbd --- /dev/null +++ b/tmt/plans/integration/plan-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-composefs-separate-boot +extra-skip_if_ostree: true +extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-composefs-uki-dumpfile.fmf b/tmt/plans/integration/plan-composefs-uki-dumpfile.fmf new file mode 100644 index 0000000000..b821799018 --- /dev/null +++ b/tmt/plans/integration/plan-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-composefs-uki-dumpfile +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-custom-selinux-policy.fmf b/tmt/plans/integration/plan-custom-selinux-policy.fmf new file mode 100644 index 0000000000..8ad11f6394 --- /dev/null +++ b/tmt/plans/integration/plan-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-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-download-only-switch.fmf b/tmt/plans/integration/plan-download-only-switch.fmf new file mode 100644 index 0000000000..8232a1875a --- /dev/null +++ b/tmt/plans/integration/plan-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-download-only-switch diff --git a/tmt/plans/integration/plan-download-only-upgrade.fmf b/tmt/plans/integration/plan-download-only-upgrade.fmf new file mode 100644 index 0000000000..a43fe2aaa6 --- /dev/null +++ b/tmt/plans/integration/plan-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-download-only-upgrade diff --git a/tmt/plans/integration/plan-etc-merge-conflict.fmf b/tmt/plans/integration/plan-etc-merge-conflict.fmf new file mode 100644 index 0000000000..34441e057f --- /dev/null +++ b/tmt/plans/integration/plan-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-etc-merge-conflict +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-factory-reset.fmf b/tmt/plans/integration/plan-factory-reset.fmf new file mode 100644 index 0000000000..8f66897b67 --- /dev/null +++ b/tmt/plans/integration/plan-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-factory-reset +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-image-pushpull-upgrade.fmf b/tmt/plans/integration/plan-image-pushpull-upgrade.fmf new file mode 100644 index 0000000000..5a8a6b11d4 --- /dev/null +++ b/tmt/plans/integration/plan-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-image-pushpull-upgrade diff --git a/tmt/plans/integration/plan-image-upgrade-reboot.fmf b/tmt/plans/integration/plan-image-upgrade-reboot.fmf new file mode 100644 index 0000000000..f5191761b5 --- /dev/null +++ b/tmt/plans/integration/plan-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-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-install-bootloader-none.fmf b/tmt/plans/integration/plan-install-bootloader-none.fmf new file mode 100644 index 0000000000..7c1364beba --- /dev/null +++ b/tmt/plans/integration/plan-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-install-bootloader-none +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-install-composefs-native.fmf b/tmt/plans/integration/plan-install-composefs-native.fmf new file mode 100644 index 0000000000..cfdaa92640 --- /dev/null +++ b/tmt/plans/integration/plan-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-install-composefs-native +extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-install-karg-delete.fmf b/tmt/plans/integration/plan-install-karg-delete.fmf new file mode 100644 index 0000000000..41d4e7112c --- /dev/null +++ b/tmt/plans/integration/plan-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-install-karg-delete +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-install-no-boot-dir.fmf b/tmt/plans/integration/plan-install-no-boot-dir.fmf new file mode 100644 index 0000000000..fd336b12ba --- /dev/null +++ b/tmt/plans/integration/plan-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-install-no-boot-dir +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-install-outside-container.fmf b/tmt/plans/integration/plan-install-outside-container.fmf new file mode 100644 index 0000000000..6a98c48c03 --- /dev/null +++ b/tmt/plans/integration/plan-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-install-outside-container diff --git a/tmt/plans/integration/plan-install-repart.fmf b/tmt/plans/integration/plan-install-repart.fmf new file mode 100644 index 0000000000..6fda712224 --- /dev/null +++ b/tmt/plans/integration/plan-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-install-repart diff --git a/tmt/plans/integration/plan-install-to-filesystem-var-mount.fmf b/tmt/plans/integration/plan-install-to-filesystem-var-mount.fmf new file mode 100644 index 0000000000..a6008a4788 --- /dev/null +++ b/tmt/plans/integration/plan-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-install-to-filesystem-var-mount diff --git a/tmt/plans/integration/plan-install-unified-flag.fmf b/tmt/plans/integration/plan-install-unified-flag.fmf new file mode 100644 index 0000000000..3873413be2 --- /dev/null +++ b/tmt/plans/integration/plan-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-install-unified-flag +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-loader-entries-source.fmf b/tmt/plans/integration/plan-loader-entries-source.fmf new file mode 100644 index 0000000000..2f9163c673 --- /dev/null +++ b/tmt/plans/integration/plan-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-loader-entries-source +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-logically-bound-install.fmf b/tmt/plans/integration/plan-logically-bound-install.fmf new file mode 100644 index 0000000000..33bc2a7c9a --- /dev/null +++ b/tmt/plans/integration/plan-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-logically-bound-install +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-logically-bound-switch.fmf b/tmt/plans/integration/plan-logically-bound-switch.fmf new file mode 100644 index 0000000000..ef43260da2 --- /dev/null +++ b/tmt/plans/integration/plan-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-logically-bound-switch +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-multi-device-esp.fmf b/tmt/plans/integration/plan-multi-device-esp.fmf new file mode 100644 index 0000000000..21655998af --- /dev/null +++ b/tmt/plans/integration/plan-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-multi-device-esp diff --git a/tmt/plans/integration/plan-readonly.fmf b/tmt/plans/integration/plan-readonly.fmf new file mode 100644 index 0000000000..9c5916e889 --- /dev/null +++ b/tmt/plans/integration/plan-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-readonly +extra-try_bind_storage: true diff --git a/tmt/plans/integration/plan-rollback.fmf b/tmt/plans/integration/plan-rollback.fmf new file mode 100644 index 0000000000..ae5a87c9c4 --- /dev/null +++ b/tmt/plans/integration/plan-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-rollback diff --git a/tmt/plans/integration/plan-shadow-fixup.fmf b/tmt/plans/integration/plan-shadow-fixup.fmf new file mode 100644 index 0000000000..bcb0df48af --- /dev/null +++ b/tmt/plans/integration/plan-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-shadow-fixup diff --git a/tmt/plans/integration/plan-soft-reboot-selinux-policy.fmf b/tmt/plans/integration/plan-soft-reboot-selinux-policy.fmf new file mode 100644 index 0000000000..de0b214005 --- /dev/null +++ b/tmt/plans/integration/plan-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-soft-reboot-selinux-policy +extra-fixme_skip_if_uki: true diff --git a/tmt/plans/integration/plan-soft-reboot.fmf b/tmt/plans/integration/plan-soft-reboot.fmf new file mode 100644 index 0000000000..a4f6386388 --- /dev/null +++ b/tmt/plans/integration/plan-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-soft-reboot diff --git a/tmt/plans/integration/plan-switch-mutate-in-place.fmf b/tmt/plans/integration/plan-switch-mutate-in-place.fmf new file mode 100644 index 0000000000..6c333446b7 --- /dev/null +++ b/tmt/plans/integration/plan-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-switch-mutate-in-place +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-switch-same-digest.fmf b/tmt/plans/integration/plan-switch-same-digest.fmf new file mode 100644 index 0000000000..43e0743acc --- /dev/null +++ b/tmt/plans/integration/plan-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-switch-same-digest +extra-skip_if_ostree: true diff --git a/tmt/plans/integration/plan-switch-to-unified.fmf b/tmt/plans/integration/plan-switch-to-unified.fmf new file mode 100644 index 0000000000..e91237972a --- /dev/null +++ b/tmt/plans/integration/plan-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-switch-to-unified +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-switch-zstd-chunked.fmf b/tmt/plans/integration/plan-switch-zstd-chunked.fmf new file mode 100644 index 0000000000..f0f8724aea --- /dev/null +++ b/tmt/plans/integration/plan-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-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-upgrade-check-status.fmf b/tmt/plans/integration/plan-upgrade-check-status.fmf new file mode 100644 index 0000000000..d86f54a70f --- /dev/null +++ b/tmt/plans/integration/plan-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-upgrade-check-status +extra-fixme_skip_if_composefs: true diff --git a/tmt/plans/integration/plan-upgrade-preflight-disk-check.fmf b/tmt/plans/integration/plan-upgrade-preflight-disk-check.fmf new file mode 100644 index 0000000000..a4bf3d5f34 --- /dev/null +++ b/tmt/plans/integration/plan-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-upgrade-preflight-disk-check diff --git a/tmt/plans/integration/plan-upgrade-tag.fmf b/tmt/plans/integration/plan-upgrade-tag.fmf new file mode 100644 index 0000000000..f9b0b0e2d1 --- /dev/null +++ b/tmt/plans/integration/plan-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-upgrade-tag diff --git a/tmt/plans/integration/plan-user-agent.fmf b/tmt/plans/integration/plan-user-agent.fmf new file mode 100644 index 0000000000..4295dcf6eb --- /dev/null +++ b/tmt/plans/integration/plan-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-user-agent diff --git a/tmt/plans/integration/plan-usroverlay.fmf b/tmt/plans/integration/plan-usroverlay.fmf new file mode 100644 index 0000000000..99c7104df8 --- /dev/null +++ b/tmt/plans/integration/plan-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-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.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-bib-build.fmf b/tmt/tests/tests/test-bib-build.fmf new file mode 100644 index 0000000000..29a349f818 --- /dev/null +++ b/tmt/tests/tests/test-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-composefs-1-16-bridge.fmf b/tmt/tests/tests/test-composefs-1-16-bridge.fmf new file mode 100644 index 0000000000..2eacc1c5f8 --- /dev/null +++ b/tmt/tests/tests/test-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-composefs-1-16-bridge.nu diff --git a/tmt/tests/tests/test-composefs-corrupted-state-resilience.fmf b/tmt/tests/tests/test-composefs-corrupted-state-resilience.fmf new file mode 100644 index 0000000000..3ca165b748 --- /dev/null +++ b/tmt/tests/tests/test-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-composefs-gc-uki.fmf b/tmt/tests/tests/test-composefs-gc-uki.fmf new file mode 100644 index 0000000000..e94608d727 --- /dev/null +++ b/tmt/tests/tests/test-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-composefs-gc.fmf b/tmt/tests/tests/test-composefs-gc.fmf new file mode 100644 index 0000000000..6f3485c281 --- /dev/null +++ b/tmt/tests/tests/test-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-composefs-separate-boot.fmf b/tmt/tests/tests/test-composefs-separate-boot.fmf new file mode 100644 index 0000000000..c2ffb8db5c --- /dev/null +++ b/tmt/tests/tests/test-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-composefs-uki-dumpfile.fmf b/tmt/tests/tests/test-composefs-uki-dumpfile.fmf new file mode 100644 index 0000000000..39a18bd3cf --- /dev/null +++ b/tmt/tests/tests/test-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-custom-selinux-policy.fmf b/tmt/tests/tests/test-custom-selinux-policy.fmf new file mode 100644 index 0000000000..6af10e6f12 --- /dev/null +++ b/tmt/tests/tests/test-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-download-only-switch.fmf b/tmt/tests/tests/test-download-only-switch.fmf new file mode 100644 index 0000000000..a70c80fd3d --- /dev/null +++ b/tmt/tests/tests/test-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-download-only-upgrade.fmf b/tmt/tests/tests/test-download-only-upgrade.fmf new file mode 100644 index 0000000000..f6fa92270e --- /dev/null +++ b/tmt/tests/tests/test-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-etc-merge-conflict.fmf b/tmt/tests/tests/test-etc-merge-conflict.fmf new file mode 100644 index 0000000000..79fcfabfe6 --- /dev/null +++ b/tmt/tests/tests/test-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-factory-reset.fmf b/tmt/tests/tests/test-factory-reset.fmf new file mode 100644 index 0000000000..f8f6818f0e --- /dev/null +++ b/tmt/tests/tests/test-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-image-pushpull-upgrade.fmf b/tmt/tests/tests/test-image-pushpull-upgrade.fmf new file mode 100644 index 0000000000..f366f83a07 --- /dev/null +++ b/tmt/tests/tests/test-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-image-upgrade-reboot.fmf b/tmt/tests/tests/test-image-upgrade-reboot.fmf new file mode 100644 index 0000000000..f6de9a3702 --- /dev/null +++ b/tmt/tests/tests/test-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-install-bootloader-none.fmf b/tmt/tests/tests/test-install-bootloader-none.fmf new file mode 100644 index 0000000000..ac97b44796 --- /dev/null +++ b/tmt/tests/tests/test-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-install-composefs-native.fmf b/tmt/tests/tests/test-install-composefs-native.fmf new file mode 100644 index 0000000000..582a5f9833 --- /dev/null +++ b/tmt/tests/tests/test-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 diff --git a/tmt/tests/tests/test-install-karg-delete.fmf b/tmt/tests/tests/test-install-karg-delete.fmf new file mode 100644 index 0000000000..479dc3c13a --- /dev/null +++ b/tmt/tests/tests/test-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-install-no-boot-dir.fmf b/tmt/tests/tests/test-install-no-boot-dir.fmf new file mode 100644 index 0000000000..caa4b0b9b0 --- /dev/null +++ b/tmt/tests/tests/test-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-install-outside-container.fmf b/tmt/tests/tests/test-install-outside-container.fmf new file mode 100644 index 0000000000..0c877ba273 --- /dev/null +++ b/tmt/tests/tests/test-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-install-repart.fmf b/tmt/tests/tests/test-install-repart.fmf new file mode 100644 index 0000000000..c8e798d307 --- /dev/null +++ b/tmt/tests/tests/test-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-install-to-filesystem-var-mount.fmf b/tmt/tests/tests/test-install-to-filesystem-var-mount.fmf new file mode 100644 index 0000000000..46e8bd7880 --- /dev/null +++ b/tmt/tests/tests/test-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-install-unified-flag.fmf b/tmt/tests/tests/test-install-unified-flag.fmf new file mode 100644 index 0000000000..2fe1ab437a --- /dev/null +++ b/tmt/tests/tests/test-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-loader-entries-source.fmf b/tmt/tests/tests/test-loader-entries-source.fmf new file mode 100644 index 0000000000..e226c6a9ab --- /dev/null +++ b/tmt/tests/tests/test-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-logically-bound-install.fmf b/tmt/tests/tests/test-logically-bound-install.fmf new file mode 100644 index 0000000000..4f88323f16 --- /dev/null +++ b/tmt/tests/tests/test-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-logically-bound-switch.fmf b/tmt/tests/tests/test-logically-bound-switch.fmf new file mode 100644 index 0000000000..268f4eb82c --- /dev/null +++ b/tmt/tests/tests/test-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-multi-device-esp.fmf b/tmt/tests/tests/test-multi-device-esp.fmf new file mode 100644 index 0000000000..c6955e9bfe --- /dev/null +++ b/tmt/tests/tests/test-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-readonly.fmf b/tmt/tests/tests/test-readonly.fmf new file mode 100644 index 0000000000..2191ab8471 --- /dev/null +++ b/tmt/tests/tests/test-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-readonly.nu diff --git a/tmt/tests/tests/test-rollback.fmf b/tmt/tests/tests/test-rollback.fmf new file mode 100644 index 0000000000..9fbb43b34f --- /dev/null +++ b/tmt/tests/tests/test-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-shadow-fixup.fmf b/tmt/tests/tests/test-shadow-fixup.fmf new file mode 100644 index 0000000000..0e689fcb60 --- /dev/null +++ b/tmt/tests/tests/test-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-shadow-fixup.nu diff --git a/tmt/tests/tests/test-soft-reboot-selinux-policy.fmf b/tmt/tests/tests/test-soft-reboot-selinux-policy.fmf new file mode 100644 index 0000000000..0a0330ebed --- /dev/null +++ b/tmt/tests/tests/test-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-soft-reboot.fmf b/tmt/tests/tests/test-soft-reboot.fmf new file mode 100644 index 0000000000..30d7b9a2f7 --- /dev/null +++ b/tmt/tests/tests/test-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-switch-mutate-in-place.fmf b/tmt/tests/tests/test-switch-mutate-in-place.fmf new file mode 100644 index 0000000000..026cc2e15b --- /dev/null +++ b/tmt/tests/tests/test-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-switch-same-digest.fmf b/tmt/tests/tests/test-switch-same-digest.fmf new file mode 100644 index 0000000000..da798e8efc --- /dev/null +++ b/tmt/tests/tests/test-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-switch-to-unified.fmf b/tmt/tests/tests/test-switch-to-unified.fmf new file mode 100644 index 0000000000..ead0029130 --- /dev/null +++ b/tmt/tests/tests/test-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-switch-zstd-chunked.fmf b/tmt/tests/tests/test-switch-zstd-chunked.fmf new file mode 100644 index 0000000000..a26f4783b5 --- /dev/null +++ b/tmt/tests/tests/test-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-upgrade-check-status.fmf b/tmt/tests/tests/test-upgrade-check-status.fmf new file mode 100644 index 0000000000..0a892d234c --- /dev/null +++ b/tmt/tests/tests/test-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-upgrade-preflight-disk-check.fmf b/tmt/tests/tests/test-upgrade-preflight-disk-check.fmf new file mode 100644 index 0000000000..68c04763b8 --- /dev/null +++ b/tmt/tests/tests/test-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-upgrade-tag.fmf b/tmt/tests/tests/test-upgrade-tag.fmf new file mode 100644 index 0000000000..c8eeadc85e --- /dev/null +++ b/tmt/tests/tests/test-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-user-agent.fmf b/tmt/tests/tests/test-user-agent.fmf new file mode 100644 index 0000000000..943176531d --- /dev/null +++ b/tmt/tests/tests/test-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-usroverlay.fmf b/tmt/tests/tests/test-usroverlay.fmf new file mode 100644 index 0000000000..c16f9e72ae --- /dev/null +++ b/tmt/tests/tests/test-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