1
0
mirror of https://github.com/systemd/systemd synced 2026-04-12 18:14:51 +02:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Evgeny Vereshchagin
4e1ab496ae {build|unit}-test: show meson-log.txt when meson fails
to make it easier to figure out why it fails.

For example in https://github.com/systemd/systemd/runs/4799774735?check_suite_focus=true
it failed with
```

meson.build:1003:8: ERROR: Command "/usr/bin/clang -print-targets" failed with status 1.

A full log can be found at /home/runner/work/systemd/systemd/build/meson-logs/meson-log.txt
Error: Process completed with exit code 1.
```
and it wasn't clear what exactly happened there.
2022-01-13 20:27:25 +09:00
Hugo Carvalho
d2ceeb624c po: Translated using Weblate (Portuguese)
Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Hugo Carvalho <hugokarvalho@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pt/
Translation: systemd/main
2022-01-13 20:24:05 +09:00
Yu Watanabe
2811b1263b
Merge pull request #22100 from bluca/test_part
Fix TEST-58-REPART on ppc64el
2022-01-13 14:00:36 +09:00
Luca Boccassi
8e65d93e85 test: do not assume x86-64 arch in TEST-58-REPART 2022-01-12 23:27:05 +00:00
Luca Boccassi
a94b9977d5 test: add partition IDs for s390x and ppc64el to TEST-50-DISSECT 2022-01-12 22:59:20 +00:00
5 changed files with 97 additions and 28 deletions

View File

@ -125,10 +125,11 @@ for args in "${ARGS[@]}"; do
meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \ meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
-Dcryptolib="${CRYPTOLIB:?}" $args build; then -Dcryptolib="${CRYPTOLIB:?}" $args build; then
cat build/meson-logs/meson-log.txt
fatal "meson failed with $args" fatal "meson failed with $args"
fi fi
if ! meson compile -C build; then if ! meson compile -C build -v; then
fatal "'meson compile' failed with $args" fatal "'meson compile' failed with $args"
fi fi

View File

@ -27,6 +27,13 @@ function info() {
echo -e "\033[33;1m$1\033[0m" echo -e "\033[33;1m$1\033[0m"
} }
function run_meson() {
if ! meson "$@"; then
find . -type f -name meson-log.txt -exec cat '{}' +
return 1
fi
}
set -ex set -ex
MESON_ARGS=(-Dcryptolib=${CRYPTOLIB:-auto}) MESON_ARGS=(-Dcryptolib=${CRYPTOLIB:-auto})
@ -49,7 +56,7 @@ for phase in "${PHASES[@]}"; do
# The docs build is slow and is not affected by compiler/flags, so do it just once # The docs build is slow and is not affected by compiler/flags, so do it just once
MESON_ARGS+=(-Dman=true) MESON_ARGS+=(-Dman=true)
fi fi
meson --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true "${MESON_ARGS[@]}" build run_meson --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true "${MESON_ARGS[@]}" build
ninja -C build -v ninja -C build -v
meson test -C build --print-errorlogs meson test -C build --print-errorlogs
;; ;;
@ -64,7 +71,7 @@ for phase in "${PHASES[@]}"; do
# -Db_lundef=false: See https://github.com/mesonbuild/meson/issues/764 # -Db_lundef=false: See https://github.com/mesonbuild/meson/issues/764
MESON_ARGS+=(-Db_lundef=false -Dfuzz-tests=true) MESON_ARGS+=(-Db_lundef=false -Dfuzz-tests=true)
fi fi
meson --werror -Dtests=unsafe -Db_sanitize=address,undefined "${MESON_ARGS[@]}" build run_meson --werror -Dtests=unsafe -Db_sanitize=address,undefined "${MESON_ARGS[@]}" build
ninja -C build -v ninja -C build -v
export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1

View File

@ -1,12 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1-or-later # SPDX-License-Identifier: LGPL-2.1-or-later
# #
# Portuguese translation of systemd. # Portuguese translation of systemd.
# Hugo Carvalho <hugokarvalho@hotmail.com>, 2021. # Hugo Carvalho <hugokarvalho@hotmail.com>, 2021, 2022.
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-08 17:48+0100\n" "POT-Creation-Date: 2021-01-08 17:48+0100\n"
"PO-Revision-Date: 2021-09-16 18:04+0000\n" "PO-Revision-Date: 2022-01-13 11:16+0000\n"
"Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n" "Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
"Language-Team: Portuguese <https://translate.fedoraproject.org/projects/" "Language-Team: Portuguese <https://translate.fedoraproject.org/projects/"
"systemd/master/pt/>\n" "systemd/master/pt/>\n"
@ -15,18 +15,18 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n" "Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.8\n" "X-Generator: Weblate 4.10.1\n"
#: src/core/org.freedesktop.systemd1.policy.in:22 #: src/core/org.freedesktop.systemd1.policy.in:22
msgid "Send passphrase back to system" msgid "Send passphrase back to system"
msgstr "Enviar frase secreta de volta ao sistema" msgstr "Enviar a palavra-passe de volta ao sistema"
#: src/core/org.freedesktop.systemd1.policy.in:23 #: src/core/org.freedesktop.systemd1.policy.in:23
msgid "" msgid ""
"Authentication is required to send the entered passphrase back to the system." "Authentication is required to send the entered passphrase back to the system."
msgstr "" msgstr ""
"É necessária autenticação para enviar a frase secreta informada de volta ao " "É necessária autenticação para enviar a palavra-passe introduzida de volta "
"sistema." "ao sistema."
#: src/core/org.freedesktop.systemd1.policy.in:33 #: src/core/org.freedesktop.systemd1.policy.in:33
msgid "Manage system services or other units" msgid "Manage system services or other units"
@ -44,21 +44,22 @@ msgstr "Gerir ficheiros de unidades e serviços do sistema"
#: src/core/org.freedesktop.systemd1.policy.in:44 #: src/core/org.freedesktop.systemd1.policy.in:44
msgid "Authentication is required to manage system service or unit files." msgid "Authentication is required to manage system service or unit files."
msgstr "" msgstr ""
"É necessária autenticação para gerir ficheiros “unit” e “service” do sistema." "É necessária a autenticação para gerir o serviço do sistema ou ficheiros de "
"unidades."
#: src/core/org.freedesktop.systemd1.policy.in:54 #: src/core/org.freedesktop.systemd1.policy.in:54
msgid "Set or unset system and service manager environment variables" msgid "Set or unset system and service manager environment variables"
msgstr "" msgstr ""
"Definir ou retirar definição de variáveis de ambiente de gerenciador de " "Definir ou retirar definição de variáveis do ambiente de gestor de serviço e "
"serviço e sistema" "sistema"
#: src/core/org.freedesktop.systemd1.policy.in:55 #: src/core/org.freedesktop.systemd1.policy.in:55
msgid "" msgid ""
"Authentication is required to set or unset system and service manager " "Authentication is required to set or unset system and service manager "
"environment variables." "environment variables."
msgstr "" msgstr ""
"É necessária autenticação para definir ou retirar definição de variáveis de " "É necessária autenticação para definir ou retirar definição de variáveis do "
"ambiente de gerenciador de serviço e sistema." "ambiente de gestor de serviço e sistema."
#: src/core/org.freedesktop.systemd1.policy.in:64 #: src/core/org.freedesktop.systemd1.policy.in:64
msgid "Reload the systemd state" msgid "Reload the systemd state"

View File

@ -102,10 +102,16 @@ elif [ "${machine}" = "ia64" ]; then
verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571 verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571
signature_guid=e98b36ee-32ba-4882-9b12-0ce14655f46a signature_guid=e98b36ee-32ba-4882-9b12-0ce14655f46a
architecture="ia64" architecture="ia64"
elif [ "${machine}" = "s390x" ]; then
root_guid=5eead9a9-fe09-4a1e-a1d7-520d00531306
verity_guid=b325bfbe-c7be-4ab8-8357-139e652d2f6b
signature_guid=c80187a5-73a3-491a-901a-017c3fa953e9
architecture="s390x"
elif [ "${machine}" = "ppc64le" ]; then elif [ "${machine}" = "ppc64le" ]; then
# There's no support of PPC in the discoverable partitions specification yet, so skip the rest for now root_guid=c31c45e6-3f39-412e-80fb-4809c4980599
echo OK >/testok verity_guid=906bd944-4589-4aae-a4e4-dd983917446a
exit 0 signature_guid=d4a236e7-e873-4c07-bf1d-bf6cf7f1c3c6
architecture="ppc64-le"
else else
echo "Unexpected uname -m: ${machine} in testsuite-50.sh, please fix me" echo "Unexpected uname -m: ${machine} in testsuite-50.sh, please fix me"
exit 1 exit 1

View File

@ -11,6 +11,60 @@ fi
export SYSTEMD_LOG_LEVEL=debug export SYSTEMD_LOG_LEVEL=debug
export PAGER=cat export PAGER=cat
machine="$(uname -m)"
if [ "${machine}" = "x86_64" ]; then
root_guid=4f68bce3-e8cd-4db1-96e7-fbcaf984b709
root_uuid=60F33797-1D71-4DCB-AA6F-20564F036CD0
usr_guid=8484680c-9521-48c6-9c11-b0720656f69e
usr_uuid=7E3369DD-D653-4513-ADF5-B993A9F20C16
architecture="x86-64"
elif [ "${machine}" = "i386" ] || [ "${machine}" = "i686" ] || [ "${machine}" = "x86" ]; then
root_guid=44479540-f297-41b2-9af7-d131d5f0458a
root_uuid=02b4253f-29a4-404e-8972-1669d3b03c87
usr_guid=75250d76-8cc6-458e-bd66-bd47cc81a812
usr_uuid=7b42ffb0-b0e1-4395-b20b-c78f4a571648
architecture="x86"
elif [ "${machine}" = "aarch64" ] || [ "${machine}" = "aarch64_be" ] || [ "${machine}" = "armv8b" ] || [ "${machine}" = "armv8l" ]; then
root_guid=b921b045-1df0-41c3-af44-4c6f280d3fae
root_uuid=055d0227-53a6-4033-85c3-9a5973eff483
usr_guid=b0e01050-ee5f-4390-949a-9101b17104e9
usr_uuid=fce3c75e-d6a4-44c0-87f0-4c105183fb1f
architecture="arm64"
elif [ "${machine}" = "arm" ]; then
root_guid=69dad710-2ce4-4e3c-b16c-21a1d49abed3
root_uuid=567da89e-8de2-4499-8d10-18f212dff034
usr_guid=7d0359a3-02b3-4f0a-865c-654403e70625
usr_uuid=71e93dc2-5073-42cb-8a84-a354e64d8966
architecture="arm"
elif [ "${machine}" = "loongarch64" ]; then
root_guid=77055800-792c-4f94-b39a-98c91b762bb6
root_uuid=d8efc2d2-0133-41e4-bdcb-3b9f4cfddde8
usr_guid=e611c702-575c-4cbe-9a46-434fa0bf7e3f
usr_uuid=031ffa75-00bb-49b6-a70d-911d2d82a5b7
architecture="loongarch64"
elif [ "${machine}" = "ia64" ]; then
root_guid=993d8d3d-f80e-4225-855a-9daf8ed7ea97
root_uuid=dcf33449-0896-4ea9-bc24-7d58aeef522d
usr_guid=4301d2a6-4e3b-4b2a-bb94-9e0b2c4225ea
usr_uuid=bc2bcce7-80d6-449a-85cc-637424ce5241
architecture="ia64"
elif [ "${machine}" = "s390x" ]; then
root_guid=5eead9a9-fe09-4a1e-a1d7-520d00531306
root_uuid=7ebe0c85-e27e-48ec-b164-f4807606232e
usr_guid=8a4f5770-50aa-4ed3-874a-99b710db6fea
usr_uuid=51171d30-35cf-4a49-b8b5-9478b9b796a5
architecture="s390x"
elif [ "${machine}" = "ppc64le" ]; then
root_guid=c31c45e6-3f39-412e-80fb-4809c4980599
root_uuid=061e67a1-092f-482f-8150-b525d50d6654
usr_guid=15bb03af-77e7-4d4a-b12b-c0d084f7491c
usr_uuid=c0d0823b-8040-4c7c-a629-026248e297fb
architecture="ppc64-le"
else
echo "Unexpected uname -m: ${machine} in testsuite-58.sh, please fix me"
exit 1
fi
rm -f /var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img /tmp/testsuite-58.dump rm -f /var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img /tmp/testsuite-58.dump
mkdir -p /tmp/testsuite-58-defs/ mkdir -p /tmp/testsuite-58-defs/
@ -25,7 +79,7 @@ EOF
cat >/tmp/testsuite-58-defs/usr.conf <<EOF cat >/tmp/testsuite-58-defs/usr.conf <<EOF
[Partition] [Partition]
Type=usr Type=usr-${architecture}
SizeMinBytes=10M SizeMinBytes=10M
Format=ext4 Format=ext4
ReadOnly=yes ReadOnly=yes
@ -33,7 +87,7 @@ EOF
cat >/tmp/testsuite-58-defs/root.conf <<EOF cat >/tmp/testsuite-58-defs/root.conf <<EOF
[Partition] [Partition]
Type=root Type=root-${architecture}
SizeMinBytes=10M SizeMinBytes=10M
Format=ext4 Format=ext4
MakeDirectories=/usr /efi MakeDirectories=/usr /efi
@ -47,9 +101,9 @@ systemd-repart --definitions=/tmp/testsuite-58-defs/ \
sfdisk --dump /var/tmp/testsuite-58.img | tee /tmp/testsuite-58.dump sfdisk --dump /var/tmp/testsuite-58.img | tee /tmp/testsuite-58.dump
grep -qxF '/var/tmp/testsuite-58.img1 : start= 2048, size= 20480, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=39107B09-615D-48FB-BA37-C663885FCE67, name="esp"' /tmp/testsuite-58.dump grep -qixF "/var/tmp/testsuite-58.img1 : start= 2048, size= 20480, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=39107B09-615D-48FB-BA37-C663885FCE67, name=\"esp\"" /tmp/testsuite-58.dump
grep -qxF '/var/tmp/testsuite-58.img2 : start= 22528, size= 20480, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=60F33797-1D71-4DCB-AA6F-20564F036CD0, name="root-x86-64", attrs="GUID:59"' /tmp/testsuite-58.dump grep -qixF "/var/tmp/testsuite-58.img2 : start= 22528, size= 20480, type=${root_guid}, uuid=${root_uuid}, name=\"root-${architecture}\", attrs=\"GUID:59\"" /tmp/testsuite-58.dump
grep -qxF '/var/tmp/testsuite-58.img3 : start= 43008, size= 20480, type=8484680C-9521-48C6-9C11-B0720656F69E, uuid=7E3369DD-D653-4513-ADF5-B993A9F20C16, name="usr-x86-64", attrs="GUID:60"' /tmp/testsuite-58.dump grep -qixF "/var/tmp/testsuite-58.img3 : start= 43008, size= 20480, type=${usr_guid}, uuid=${usr_uuid}, name=\"usr-${architecture}\", attrs=\"GUID:60\"" /tmp/testsuite-58.dump
# Second part, duplicate it with CopyBlocks=auto # Second part, duplicate it with CopyBlocks=auto
@ -61,14 +115,14 @@ EOF
cat >/tmp/testsuite-58-defs/usr.conf <<EOF cat >/tmp/testsuite-58-defs/usr.conf <<EOF
[Partition] [Partition]
Type=usr Type=usr-${architecture}
ReadOnly=yes ReadOnly=yes
CopyBlocks=auto CopyBlocks=auto
EOF EOF
cat >/tmp/testsuite-58-defs/root.conf <<EOF cat >/tmp/testsuite-58-defs/root.conf <<EOF
[Partition] [Partition]
Type=root Type=root-${architecture}
CopyBlocks=auto CopyBlocks=auto
EOF EOF
@ -91,7 +145,7 @@ mkdir -p /tmp/testsuite-58.3-defs/
cat >/tmp/testsuite-58.3-defs/root.conf <<EOF cat >/tmp/testsuite-58.3-defs/root.conf <<EOF
[Partition] [Partition]
Type=root Type=root-${architecture}
EOF EOF
truncate -s 10g /var/tmp/testsuite-58.3.img truncate -s 10g /var/tmp/testsuite-58.3.img
@ -111,7 +165,7 @@ sfdisk --dump /var/tmp/testsuite-58.3.img | tee /tmp/testsuite-58.3.dump
grep -qF '/var/tmp/testsuite-58.3.img1 : start= 2048, size= 69044,' /tmp/testsuite-58.3.dump grep -qF '/var/tmp/testsuite-58.3.img1 : start= 2048, size= 69044,' /tmp/testsuite-58.3.dump
grep -qF '/var/tmp/testsuite-58.3.img2 : start= 71092, size= 3591848,' /tmp/testsuite-58.3.dump grep -qF '/var/tmp/testsuite-58.3.img2 : start= 71092, size= 3591848,' /tmp/testsuite-58.3.dump
grep -qxF '/var/tmp/testsuite-58.3.img3 : start= 3662944, size= 17308536, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709, uuid=60F33797-1D71-4DCB-AA6F-20564F036CD0, name="root-x86-64", attrs="GUID:59"' /tmp/testsuite-58.3.dump grep -qixF "/var/tmp/testsuite-58.3.img3 : start= 3662944, size= 17308536, type=${root_guid}, uuid=${root_uuid}, name=\"root-${architecture}\", attrs=\"GUID:59\"" /tmp/testsuite-58.3.dump
rm /var/tmp/testsuite-58.3.img /tmp/testsuite-58.3.dump rm /var/tmp/testsuite-58.3.img /tmp/testsuite-58.3.dump
rm -r /tmp/testsuite-58.3-defs/ rm -r /tmp/testsuite-58.3-defs/
@ -120,7 +174,7 @@ rm -r /tmp/testsuite-58.3-defs/
mkdir -p /tmp/testsuite-58-issue-21817-defs/ mkdir -p /tmp/testsuite-58-issue-21817-defs/
truncate -s 100m /tmp/testsuite-58-issue-21817.img truncate -s 100m /tmp/testsuite-58-issue-21817.img
LOOP=$(losetup -P --show -f /tmp/testsuite-58-issue-21817.img) LOOP=$(losetup -P --show -f /tmp/testsuite-58-issue-21817.img)
printf 'size=50M,type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709\n,\n' | sfdisk -X gpt /tmp/testsuite-58-issue-21817.img printf 'size=50M,type=%s\n,\n' "${root_guid}" | sfdisk -X gpt /tmp/testsuite-58-issue-21817.img
cat >/tmp/testsuite-58-issue-21817-defs/test.conf <<EOF cat >/tmp/testsuite-58-issue-21817-defs/test.conf <<EOF
[Partition] [Partition]
Type=root Type=root
@ -129,7 +183,7 @@ systemd-repart --pretty=yes --definitions /tmp/testsuite-58-issue-21817-defs/ "$
sfdisk --dump "$LOOP" | tee /tmp/testsuite-58-issue-21817.dump sfdisk --dump "$LOOP" | tee /tmp/testsuite-58-issue-21817.dump
losetup -d "$LOOP" losetup -d "$LOOP"
grep -qF 'p1 : start= 2048, size= 102400, type=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709,' /tmp/testsuite-58-issue-21817.dump grep -qiF "p1 : start= 2048, size= 102400, type=${root_guid}," /tmp/testsuite-58-issue-21817.dump
grep -qF 'p2 : start= 104448, size= 100319,' /tmp/testsuite-58-issue-21817.dump grep -qF 'p2 : start= 104448, size= 100319,' /tmp/testsuite-58-issue-21817.dump
rm /tmp/testsuite-58-issue-21817.img /tmp/testsuite-58-issue-21817.dump rm /tmp/testsuite-58-issue-21817.img /tmp/testsuite-58-issue-21817.dump