integration-test: skip several test cases on Alpine/postmarketOS

This commit is contained in:
Yu Watanabe
2025-11-28 23:27:26 +09:00
parent 355bcc243c
commit 9fafe89bcc
7 changed files with 64 additions and 2 deletions

View File

@@ -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() {

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"