debian-forge/test
Tomáš Hozza 3e780762cb stages/sgdisk: option to not quote partition names passed to sgdisk
The partition name in the sgdisk stage was previously quoted when
passed to sgdisk as an argument. I think that this was done because
the sgdisk man page states that:

```
If you want to set a name that includes a space, enclose it in
quotation marks, as in sgdisk -c 1:"Sample Name" /dev/sdb.
```

However, this should apply only when sgdisk is run in a shell, so that
the argument is not split by shell into multiple arguments and passes
as a single string.

The stage is executing sgdisk using Python `subprocess` module, which
does not need strings with spaces to be quoted, because they are passed
to the command as separate items which are not split in any way.

The previous behavior of the stage was that these quotes became part of
the actual partition name in the partition table.

After a discussion within the team, we determined that this is a bug.
However, fixing it would result in osbuild producing a different
artifact for the same manifest, compared to osbuild version without such
fix. This is undesired.

For backward compatibility, a new `quote_partition_name` property is
added to the stage options, which can be used to make the stage not
quote the partition name when passed to `sgdisk`. As a result, the
partition name won't be quoted in the partition table.

The default stage behavior us kept.

Modify unit tests to use this option by default.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-26 08:43:52 +02:00
..
cases test/ostree-image: +fedora-ostree-native-container 2022-12-15 11:13:19 +01:00
data stages/sgdisk: option to not quote partition names passed to sgdisk 2023-05-26 08:43:52 +02:00
mod Test: some tests depending on rpm-ostree were not checking its presence 2023-04-28 22:02:35 +02:00
run loop: use LOOP_CONFIGURE instead of LOOP_SET_FD 2023-05-05 15:42:47 +02:00
src test/src: improve file enumeration 2022-09-23 12:08:10 +02:00
.gitignore introduce testing script 2019-07-09 10:29:48 +02:00
__init__.py osbuild: add description() methods 2019-08-07 10:01:17 +02:00
conftest.py Test: add ability to skip tests for unsupported file-systems 2023-04-21 17:13:10 +02:00
initrd.py test: explicit encodings for open() 2022-09-09 15:33:29 +02:00
test.py Test: add ability to skip tests for unsupported file-systems 2023-04-21 17:13:10 +02:00