test: fix test_assembler to support parallel runs and run in parallel

The `test_assembler.py` hardcods some filesystem and partition
UUIDs. This leads to hard to diagnose test failures when the
test is run in parallel. The btrfs and xfs filesystem drivers
will see the same uuid for multi created images and error sometimes with
someting like:
```
Mar 06 10:22:54 top kernel: BTRFS error: device /dev/loop104 belongs to fsid aff010e9-df95-4f81-be6b-e22317251033, and the fs is already mounted, scanned by mount (123856)
```
Its a race that only happens when two images are checked at the
same time.

This commit fixes the issue by just using a randomized UUID in
the test_assemblers.py. It also re-enables running the test in
parallel (which make it run a lot faster, from 34min to 14min).
This commit is contained in:
Michael Vogt 2024-03-06 11:19:13 +01:00 committed by Simon Steinbeiß
parent 87636878da
commit 1278e5d217
2 changed files with 7 additions and 3 deletions

View file

@ -66,6 +66,9 @@ jobs:
with:
image: ghcr.io/osbuild/osbuild-ci:latest-202308241910
run: |
# Using 4 workers is a bit arbitrary, "auto" is probably too
# aggressive.
export TEST_WORKERS="-n 4"
export OSBUILD_TEST_STORE=/var/tmp/osbuild-test-store
TEST_CATEGORY="test.run.test_assemblers" \
tox -e "py36"