summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2024-10-16 10:21:22 +0200
committerGitHub <noreply@github.com>2024-10-16 10:21:22 +0200
commit8bea6780f29fa8740aec69e78839d0426e529c27 (patch)
treece4351895f3ef2df46b9b173baedd0d72fe717d3
parentgpt-auto: remove directory check for ESP mount (diff)
parentTEST-64-UDEV-STORAGE: insert udevadm settle more (diff)
downloadsystemd-8bea6780f29fa8740aec69e78839d0426e529c27.tar.xz
systemd-8bea6780f29fa8740aec69e78839d0426e529c27.zip
Merge pull request #34742 from yuwata/test-storage
test: fix multipath test in TEST-64-STORAGE
-rw-r--r--mkosi.conf.d/10-debian-ubuntu/mkosi.conf4
-rw-r--r--mkosi.conf.d/10-opensuse/mkosi.conf4
-rw-r--r--mkosi.conf.d/10-ubuntu/mkosi.conf.d/non-x86.conf4
-rw-r--r--mkosi.conf.d/10-ubuntu/mkosi.conf.d/x86.conf4
-rw-r--r--test/README.testsuite2
-rwxr-xr-xtest/units/TEST-58-REPART.sh3
-rwxr-xr-xtest/units/TEST-64-UDEV-STORAGE.sh8
7 files changed, 17 insertions, 12 deletions
diff --git a/mkosi.conf.d/10-debian-ubuntu/mkosi.conf b/mkosi.conf.d/10-debian-ubuntu/mkosi.conf
index 472064e45d..46dd98828f 100644
--- a/mkosi.conf.d/10-debian-ubuntu/mkosi.conf
+++ b/mkosi.conf.d/10-debian-ubuntu/mkosi.conf
@@ -4,8 +4,8 @@
Distribution=|debian
Distribution=|ubuntu
-[Distribution]
-PackageManagerTrees=mkosi-pinning.pref:/etc/apt/preferences.d/mkosi-pinning.pref
+[Build]
+SandboxTrees=mkosi-pinning.pref:/etc/apt/preferences.d/mkosi-pinning.pref
[Content]
VolatilePackages=
diff --git a/mkosi.conf.d/10-opensuse/mkosi.conf b/mkosi.conf.d/10-opensuse/mkosi.conf
index dc9bf30429..8a08b1f8c7 100644
--- a/mkosi.conf.d/10-opensuse/mkosi.conf
+++ b/mkosi.conf.d/10-opensuse/mkosi.conf
@@ -6,7 +6,9 @@ Distribution=opensuse
[Distribution]
Release=tumbleweed
Repositories=non-oss
-PackageManagerTrees=macros.db_backend:/etc/rpm/macros.db_backend
+
+[Build]
+SandboxTrees=macros.db_backend:/etc/rpm/macros.db_backend
[Content]
VolatilePackages=
diff --git a/mkosi.conf.d/10-ubuntu/mkosi.conf.d/non-x86.conf b/mkosi.conf.d/10-ubuntu/mkosi.conf.d/non-x86.conf
index 582f038b5f..8e0e3c0d78 100644
--- a/mkosi.conf.d/10-ubuntu/mkosi.conf.d/non-x86.conf
+++ b/mkosi.conf.d/10-ubuntu/mkosi.conf.d/non-x86.conf
@@ -6,5 +6,5 @@ Architecture=!x86-64
Architecture=!x86
Release=noble
-[Distribution]
-PackageManagerTrees=noble-backports-ports.sources:/etc/apt/sources.list.d/noble-backports-ports.sources
+[Build]
+SandboxTrees=noble-backports-ports.sources:/etc/apt/sources.list.d/noble-backports-ports.sources
diff --git a/mkosi.conf.d/10-ubuntu/mkosi.conf.d/x86.conf b/mkosi.conf.d/10-ubuntu/mkosi.conf.d/x86.conf
index 7347be9069..e0e96b2c18 100644
--- a/mkosi.conf.d/10-ubuntu/mkosi.conf.d/x86.conf
+++ b/mkosi.conf.d/10-ubuntu/mkosi.conf.d/x86.conf
@@ -6,5 +6,5 @@ Architecture=|x86-64
Architecture=|x86
Release=noble
-[Distribution]
-PackageManagerTrees=noble-backports.sources:/etc/apt/sources.list.d/noble-backports.sources
+[Build]
+SandboxTrees=noble-backports.sources:/etc/apt/sources.list.d/noble-backports.sources
diff --git a/test/README.testsuite b/test/README.testsuite
index 8cacbb40af..a513d1c6b9 100644
--- a/test/README.testsuite
+++ b/test/README.testsuite
@@ -25,7 +25,7 @@ Environment=NO_BUILD=1
You might also want to use the `PackageDirectories=` or `Repositories=` option to provide
mkosi with a directory or repository containing the systemd packages that should be installed
instead. If the repository containing the systemd packages is not a builtin repository known
-by mkosi, you can use the `PackageManagerTrees=` option to write an extra repository definition
+by mkosi, you can use the `SandboxTrees=` option to write an extra repository definition
to /etc which is used when building the image instead.
Next, we can build the integration test image with meson:
diff --git a/test/units/TEST-58-REPART.sh b/test/units/TEST-58-REPART.sh
index 0af6f6ad28..b3181cea99 100755
--- a/test/units/TEST-58-REPART.sh
+++ b/test/units/TEST-58-REPART.sh
@@ -4,9 +4,6 @@
set -eux
set -o pipefail
-# shellcheck source=test/units/util.sh
-. "$(dirname "$0")"/util.sh
-
if ! command -v systemd-repart >/dev/null; then
echo "no systemd-repart" >/skipped
exit 77
diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh
index 318e98ce47..6c8f6d63e6 100755
--- a/test/units/TEST-64-UDEV-STORAGE.sh
+++ b/test/units/TEST-64-UDEV-STORAGE.sh
@@ -290,15 +290,21 @@ label: gpt
name="first_partition", size=5M
uuid="deadbeef-dead-dead-beef-000000000000", name="failover_part", size=5M
EOF
+ # Partitioning triggers a synthesized event. Wait for the event being finished.
udevadm settle
+
udevadm lock --device /dev/disk/by-id/wwn-0xdeaddeadbeef0000-part2 \
mkfs.ext4 -U "deadbeef-dead-dead-beef-111111111111" -L "failover_vol" /dev/disk/by-id/wwn-0xdeaddeadbeef0000-part2
+ # Making filesystem triggers a synthesized event. Wait for the event being finished.
+ udevadm settle
modprobe -v dm_multipath
systemctl start multipathd.service
systemctl status multipathd.service
- multipath -ll
+ # multipathd touches many devices on start. multipath command may fail if it is invoked before the
+ # initial setup finished. Let's wait for a while.
udevadm settle
+ multipath -ll
ls -l /dev/disk/by-id/
for i in {0..15}; do