stages/org.osbuild.mkfs.ext4: add ext4 options

Add optional flags to the org.osbuild.mkfs.ext4 stage enabling/disabling
the metadata_csum_seed and orphan_file features.
This commit is contained in:
Luke Yang 2024-01-10 10:49:45 -05:00 committed by Dusty Mabe
parent 408b101799
commit 106681f41e
2 changed files with 20 additions and 6 deletions

View file

@ -82,6 +82,11 @@ def test_mkfs_ext4_integration(tmp_path):
({}, []),
({"verity": True}, ["-O", "verity"]),
({"verity": False}, ["-O", "^verity"]),
({"orphan_file": True}, ["-O", "orphan_file"]),
({"orphan_file": False}, ["-O", "^orphan_file"]),
({"metadata_csum_seed": True}, ["-O", "metadata_csum_seed"]),
({"metadata_csum_seed": False}, ["-O", "^metadata_csum_seed"]),
({"verity": True, "orphan_file": True, "metadata_csum_seed": True}, ["-O", "verity", "-O", "orphan_file", "-O", "metadata_csum_seed"]),
])
@mock.patch("subprocess.run")
def test_mkfs_ext4_cmdline(mock_run, test_input, expected):