test: fix new mount tests under rhel8

The new `create_image_with_partitions()` helper fails under rhel8
currently. The reason is that `mkfs.ext4 -E offset=` will warn
in older versions about a partition table and require user input.

This got fixed `e2fsprogs` 1.46.3 in Jul 2021 but RHEL8 still
has 1.45.

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989612
This commit is contained in:
Michael Vogt 2024-01-16 11:14:43 +01:00 committed by Tomáš Hozza
parent d50705249a
commit d96f94fede

View file

@ -178,8 +178,8 @@ def create_image_with_partitions(tmp_path):
["parted", "--script", img, "mklabel", "msdos"],
["parted", "--script", img, "mkpart", "primary", "ext4", "1MiB", "10Mib"],
["parted", "--script", img, "mkpart", "primary", "ext4", "10MiB", "19Mib"],
["mkfs.ext4", "-E", f"offset={1*1024*1024}", img, "9M"],
["mkfs.ext4", "-E", f"offset={10*1024*1024}", img, "9M"],
["mkfs.ext4", "-F", "-E", f"offset={1*1024*1024}", img, "9M"],
["mkfs.ext4", "-F", "-E", f"offset={10*1024*1024}", img, "9M"],
]:
subprocess.check_call(cmd)
return tree, img.name