]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
integration-test: skip several test cases on Alpine/postmarketOS
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Nov 2025 14:27:26 +0000 (23:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 7 Dec 2025 00:09:03 +0000 (09:09 +0900)
test/units/TEST-46-HOMED.sh
test/units/TEST-50-DISSECT.dissect.sh
test/units/TEST-64-UDEV-STORAGE.sh
test/units/TEST-67-INTEGRITY.sh
test/units/TEST-70-TPM2.tpm2-setup.sh
test/units/TEST-75-RESOLVED.sh
test/units/TEST-89-RESOLVED-MDNS.sh

index b18e05f153649897c119c01e6dd613bf3dc40367..e7ea57409318da929d8b535cb67402a988aa7e88 100755 (executable)
@@ -52,6 +52,12 @@ systemctl kill -sUSR1 systemd-homed
 testcase_basic() {
     local TMP_SKEL
 
+    . /etc/os-release
+    if [[ "${ID_LIKE:-}" == alpine ]] && ! systemd-detect-virt -cq; then
+        # luks seems to be broken on alpine/postmarketos.
+        return 0
+    fi
+
     TMP_SKEL=$(mktemp -d)
     echo hogehoge >"$TMP_SKEL"/hoge
 
@@ -237,6 +243,12 @@ testcase_basic() {
 }
 
 testcase_blob() {
+    . /etc/os-release
+    if [[ "${ID_LIKE:-}" == alpine ]] && ! systemd-detect-virt -cq; then
+        # luks seems to be broken on alpine/postmarketos.
+        return 0
+    fi
+
     # blob directory tests
     # See docs/USER_RECORD_BLOB_DIRS.md
     checkblob() {
index bf45489545e53a6be1df7dfb034530ea0ccaf81e..5bd95fbe0d842ec8966154a83c79992b93c68cc2 100755 (executable)
@@ -9,6 +9,14 @@ set -o pipefail
 # shellcheck source=test/units/util.sh
 . "$(dirname "$0")"/util.sh
 
+. /etc/os-release
+if [[ "${ID_LIKE:-}" == alpine ]]; then
+    # Alpine/postmarketOS builds libdevmapper and so on without systemd support, and seems to not wait for
+    # uevents for dm-X devices being processed by systemd-udevd. That causes a significant issue in
+    # dissect-image.c especially when multiple dm-X devices are activated/deactivated in parallel.
+    exit 0
+fi
+
 systemd-dissect --json=short "$MINIMAL_IMAGE.raw" | \
     grep -q -F '{"rw":"ro","designator":"root","partition_uuid":null,"partition_label":null,"fstype":"squashfs","architecture":null,"verity":"external"'
 systemd-dissect "$MINIMAL_IMAGE.raw" | grep -q -F "MARKER=1"
index 88c89c5191215b45e9f99bb067b1c731e4e3cdf6..5956e14aec2d722c210f174585b9723115db40f4 100755 (executable)
@@ -266,6 +266,12 @@ EOF
 testcase_multipath_basic_failover() {
     local dmpath i path wwid
 
+    . /etc/os-release
+    if [[ "${ID_LIKE:-}" == "alpine" ]]; then
+        echo "multipath on alpine/postmarketos is broken, skipping the test" | tee --append /skipped
+        exit 77
+    fi
+
     # Configure multipath
     cat >/etc/multipath.conf <<\EOF
 defaults {
@@ -631,8 +637,8 @@ testcase_lvm_basic() {
     )
 
     . /etc/os-release
-    if [[ "$ID" == "ubuntu" ]]; then
-        echo "LVM on Ubuntu is broken, skipping the test" | tee --append /skipped
+    if [[ "$ID" == "ubuntu" || "${ID_LIKE:-}" == "alpine" ]]; then
+        echo "LVM on Ubuntu/alpine/postmarketos is broken, skipping the test" | tee --append /skipped
         exit 77
     fi
 
index c015703666f4a2befbe7e3e89444582f26e00180..0919f2024870375547dfa3d953a7fe751a66afd0 100755 (executable)
@@ -2,6 +2,8 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 set -euxo pipefail
 
+. /etc/os-release
+
 DM_NAME="integrity_test"
 DM_NODE="/dev/mapper/${DM_NAME}"
 DM_SERVICE="systemd-integritysetup@${DM_NAME}.service"
@@ -117,6 +119,18 @@ EOF
 }
 
 for a in crc32c crc32 xxhash64 sha1 sha256; do
+    if [[ "$a" == crc32 && "${ID_LIKE:-}" == alpine ]]; then
+        # crc32 is not supported on alpine/postmarketos ??
+        # --------
+        # [   22.419458] TEST-67-INTEGRITY.sh[3085]: + integritysetup format /dev/loop0 --batch-mode -I crc32 ''
+        # [   22.433168] kernel: device-mapper: table: 253:0: integrity: Invalid internal hash (-ENOENT)
+        # [   22.433220] TEST-67-INTEGRITY.sh[3475]: device-mapper: reload ioctl on temporary-cryptsetup-6b3b80ef-6854-4102-8239-6360f15af0c3 (253:0) failed: No such file or directory
+        # [   22.433220] TEST-67-INTEGRITY.sh[3475]: Cannot format integrity for device /dev/loop0.
+        # [   22.433835] kernel: device-mapper: ioctl: error adding target to table
+        # --------
+        continue;
+    fi
+
     test_one "$a" 0
     test_one "$a" 1
 done
index 72f784185850c7fb2c5f04a3c9e17d5addf5c7fc..23cb85e30b2c143ac69c95a2c16106c76c134d42 100755 (executable)
@@ -11,6 +11,16 @@ if [[ ! -x "${SD_TPM2SETUP:?}" ]]; then
     exit 0
 fi
 
+. /etc/os-release
+if [[ "${ID_LIKE:-}" == alpine ]]; then
+    # For some unknown reasons, the test fails with the following:
+    # --------
+    # Couldn't find signature for this PCR bank, PCR index and public key.
+    # Failed to unseal secret using TPM2: No such device or address
+    # --------
+    exit 0
+fi
+
 "$SD_TPM2SETUP" --help
 "$SD_TPM2SETUP" --version
 "$SD_TPM2SETUP" --tpm2-device=list
index 35ca98d07f00c0b0c289ab286849a038b915c4fa..51820016ddeec191c9e44fccf8e239a022146b05 100755 (executable)
@@ -979,6 +979,12 @@ testcase_11_nft() {
     grep -qE "no servers could be reached" "$RUN_OUT"
     nft flush ruleset
 
+    . /etc/os-release
+    if [[ "${ID_LIKE:-}" == alpine ]]; then
+        # FIXME: For some reasons, the following tests will fail on alpine/postmarketos.
+        return 0
+    fi
+
     ### Test TIMEOUT with serve stale feature ###
 
     mkdir -p /run/systemd/resolved.conf.d
index a7062b813a8ecf2bf04d8e395f539a7f95994f88..ae18cd49e8af48b4456f6269f4ed25812f7ff5ad 100755 (executable)
@@ -6,6 +6,12 @@ set -o pipefail
 # shellcheck source=test/units/test-control.sh
 . "$(dirname "$0")"/test-control.sh
 
+. /etc/os-release
+if [[ "${ID_LIKE:-}" == alpine ]]; then
+    # FIXME: For some reasons (maybe this test requires nss module??), the test fails on alpine/postmarketos.
+    exit 77
+fi
+
 SERVICE_TYPE_COUNT=10
 SERVICE_COUNT=20
 CONTAINER_ZONE="test-$RANDOM"