tests: Use ext4, re-enable composefs test
authorColin Walters <walters@verbum.org>
Thu, 12 Oct 2023 22:24:00 +0000 (18:24 -0400)
committerColin Walters <walters@verbum.org>
Fri, 13 Oct 2023 16:00:05 +0000 (12:00 -0400)
Until the XFS fsverity stuff lands.

ci/prow/fcos-e2e.sh
tests/inst/src/composefs.rs
tests/inst/src/insttestmain.rs

index 3151898b00ad802b68175625aee4dcae339503c3..f076f31eea74a8d672a668812d6939cac43ae580 100755 (executable)
@@ -10,6 +10,8 @@ cd $(mktemp -d)
 cosa init https://github.com/coreos/fedora-coreos-config/
 rsync -rlv /cosa/component-install/ overrides/rootfs/
 cosa fetch
+# For composefs
+echo 'rootfs: "ext4verity"' >> src/config/image.yaml
 cosa build
 # For now, Prow just runs the composefs tests, since Jenkins covers the others
 #cosa kola run 'ext.ostree.destructive-rs.composefs*'
index 219b9e12be99108d43369686c035df6fcc4ba62f..fa6d3d374a7b3d8dfd5888e6424926b3d7d16959 100644 (file)
@@ -131,15 +131,21 @@ fn verify_composefs_signed(sh: &xshell::Shell, metadata: &glib::VariantDict) ->
     Ok(())
 }
 
-#[allow(dead_code)]
 pub(crate) fn itest_composefs() -> Result<()> {
     let sh = &xshell::Shell::new()?;
-    if !cmd!(sh, "ostree --version").read()?.contains("- composefs") {
-        println!("SKIP no composefs support");
-        return Ok(());
-    }
     let mark = match crate::test::get_reboot_mark()? {
         None => {
+            if !cmd!(sh, "ostree --version").read()?.contains("- composefs") {
+                println!("SKIP no composefs support");
+                return Ok(());
+            }
+            {
+                let fstype = cmd!(sh, "stat -f / -c %T").read()?;
+                if fstype.trim() == "xfs" {
+                    println!("SKIP no xfs fsverity yet");
+                    return Ok(());
+                }
+            }
             cmd!(
                 sh,
                 "ostree --repo=/ostree/repo config set ex-integrity.composefs true"
index 2da35ffed5fbac70dad161106225320a1c00629d..1613385cd527f6381745649ba82f80d5813c09a3 100644 (file)
@@ -33,7 +33,7 @@ const TESTS: &[StaticTest] = &[
 ];
 const DESTRUCTIVE_TESTS: &[StaticTest] = &[
     test!(destructive::itest_transactionality),
-    // test!(composefs::itest_composefs),
+    test!(composefs::itest_composefs),
 ];
 
 #[derive(Debug, StructOpt)]