From 1474259ace3c76ab448b1a404d7d8e092e15477b Mon Sep 17 00:00:00 2001 From: cgwalters-bot Date: Thu, 24 Sep 2026 09:48:11 -0400 Subject: [PATCH] tests: Run install config and printconfig --all in one test The container tests run in parallel under libtest-mimic, and the printconfig --all test creates and removes /run/bootc/install/10-test.toml while the plain install config test scans that same directory. If the fragment is deleted between the scan and the read, the plain test fails with "Loading configuration: No such file or directory". This showed up as a flake in CI. There's no way to point bootc at a different config root, so just run the two checks sequentially in a single test. Generated-by: AI --- crates/tests-integration/src/container.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/tests-integration/src/container.rs b/crates/tests-integration/src/container.rs index 08716f475a..dc5ac6ac20 100644 --- a/crates/tests-integration/src/container.rs +++ b/crates/tests-integration/src/container.rs @@ -121,10 +121,13 @@ pub(crate) fn test_bootc_install_config() -> Result<()> { serde_json::from_str(&config).context("Parsing install config")?; // check that it parses okay, but also ensure kargs is not available here (only via --all) assert!(config.get("kargs").is_none()); - Ok(()) + // This must run sequentially after the above, not as a separate parallel + // test: it writes a fragment into /run/bootc/install that would otherwise + // race with the config scan above. + test_bootc_install_config_all() } -pub(crate) fn test_bootc_install_config_all() -> Result<()> { +fn test_bootc_install_config_all() -> Result<()> { #[derive(Deserialize)] #[serde(rename_all = "kebab-case")] struct TestOstreeConfig { @@ -531,7 +534,6 @@ pub(crate) fn run(testargs: libtest_mimic::Arguments) -> Result<()> { new_test("variant-base-crosscheck", test_variant_base_crosscheck), new_test("bootc upgrade", test_bootc_upgrade), new_test("install config", test_bootc_install_config), - new_test("printconfig --all", test_bootc_install_config_all), new_test("status", test_bootc_status), new_test("container inspect", test_bootc_container_inspect), new_test("system-reinstall --help", test_system_reinstall_help),