From 1bac565641a89aa3624082866a357cd63649b045 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 17 Oct 2020 17:58:32 +0100 Subject: [PATCH 1/5] Revert "Block TEST-50-DISSECT on Ubuntu CI temporarily" This reverts commit 329315b29f63adb05054c26f739f68780fadfa0a. --- test/TEST-50-DISSECT/deny-list-ubuntu-ci | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test/TEST-50-DISSECT/deny-list-ubuntu-ci diff --git a/test/TEST-50-DISSECT/deny-list-ubuntu-ci b/test/TEST-50-DISSECT/deny-list-ubuntu-ci deleted file mode 100644 index e69de29bb2..0000000000 From d888cd4cfcccdc5e881e11d64007061318223590 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 16 Oct 2020 13:20:45 +0100 Subject: [PATCH 2/5] test: fix TEST-50-DISSECT build on Ubuntu CI Ubuntu CI's just got the dependencies require dto run this test added, and it seems the build is different enough from other platforms that it fails to create the required directories: cp: cannot create regular file '/var/tmp/systemd-test.JJMOBY/minimal/usr/lib/os-release': No such file or directory --- test/TEST-50-DISSECT/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/TEST-50-DISSECT/test.sh b/test/TEST-50-DISSECT/test.sh index f274b73522..073ca8c31b 100755 --- a/test/TEST-50-DISSECT/test.sh +++ b/test/TEST-50-DISSECT/test.sh @@ -37,7 +37,7 @@ test_create_image() { ) oldinitdir=$initdir export initdir=$TESTDIR/minimal - mkdir -p $initdir + mkdir -p $initdir/usr/lib $initdir/etc setup_basic_dirs install_basic_tools cp $os_release $initdir/usr/lib/os-release From 964523e6c2461951db31789af85ab5b52d95e970 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 16 Oct 2020 17:51:58 +0100 Subject: [PATCH 3/5] test/README: notes about Ubuntu CI logs and dependencies Add a note about where to find the full journal, and how to add packages/dependencies for the Ubuntu CI. --- test/README.testsuite | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/README.testsuite b/test/README.testsuite index 34c7ab3f7d..5d9e498c51 100644 --- a/test/README.testsuite +++ b/test/README.testsuite @@ -120,3 +120,12 @@ https://wiki.debian.org/ArchitectureSpecificsMemo For PRs that fix a currently deny-listed test, the PR should include removal of the deny-list file. + +In case a test fails, the full set of artifacts, including the journal of the +failed run, can be downloaded from the artifacts.tar.gz archive which will be +reachable in the same URL parent directory as the logs.gz that gets linked on +the Github CI status. + +To add new dependencies or new binaries to the packages used during the tests, +a merge request can be sent to: https://salsa.debian.org/systemd-team/systemd +targeting the 'upstream-ci' branch. From 7580a647661ecff799740f8d7cab2fcc2db77436 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 17 Oct 2020 22:10:42 +0100 Subject: [PATCH 4/5] test: increase size of verity partition in TEST-50-DISSECT GPT image On Ubuntu it seems there's some padding added --- test/units/testsuite-50.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh index 883c83b8b7..1454ec4640 100755 --- a/test/units/testsuite-50.sh +++ b/test/units/testsuite-50.sh @@ -102,7 +102,7 @@ if [ ${root_size} -ge 1024 ]; then else root_size="${root_size}KiB" fi -verity_size="${verity_size}KiB" +verity_size="$((${verity_size} * 2))KiB" uuid="$(head -c 32 ${image}.roothash | cut -c -8)-$(head -c 32 ${image}.roothash | cut -c 9-12)-$(head -c 32 ${image}.roothash | cut -c 13-16)-$(head -c 32 ${image}.roothash | cut -c 17-20)-$(head -c 32 ${image}.roothash | cut -c 21-)" echo -e "label: gpt\nsize=${root_size}, type=${root_guid}, uuid=${uuid}" | sfdisk ${image}.gpt uuid="$(tail -c 32 ${image}.roothash | cut -c -8)-$(tail -c 32 ${image}.roothash | cut -c 9-12)-$(tail -c 32 ${image}.roothash | cut -c 13-16)-$(tail -c 32 ${image}.roothash | cut -c 17-20)-$(tail -c 32 ${image}.roothash | cut -c 21-)" From 9198752738f5cc229aaf1e008eca23dfcaf017b0 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 18 Oct 2020 15:41:34 +0100 Subject: [PATCH 5/5] test: account for non-x86-64 archs in TEST-50-DISSECT --- test/units/testsuite-50.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh index 1454ec4640..d615ac2ea7 100755 --- a/test/units/testsuite-50.sh +++ b/test/units/testsuite-50.sh @@ -74,18 +74,27 @@ machine="$(uname -m)" if [ "${machine}" = "x86_64" ]; then root_guid=4f68bce3-e8cd-4db1-96e7-fbcaf984b709 verity_guid=2c7357ed-ebd2-46d9-aec1-23d437ec2bf5 + architecture="x86-64" elif [ "${machine}" = "i386" ] || [ "${machine}" = "i686" ] || [ "${machine}" = "x86" ]; then root_guid=44479540-f297-41b2-9af7-d131d5f0458a verity_guid=d13c5d3b-b5d1-422a-b29f-9454fdc89d76 + architecture="x86" elif [ "${machine}" = "aarch64" ] || [ "${machine}" = "aarch64_be" ] || [ "${machine}" = "armv8b" ] || [ "${machine}" = "armv8l" ]; then root_guid=b921b045-1df0-41c3-af44-4c6f280d3fae verity_guid=df3300ce-d69f-4c92-978c-9bfb0f38d820 + architecture="arm64" elif [ "${machine}" = "arm" ]; then root_guid=69dad710-2ce4-4e3c-b16c-21a1d49abed3 verity_guid=7386cdf2-203c-47a9-a498-f2ecce45a2d6 + architecture="arm" elif [ "${machine}" = "ia64" ]; then root_guid=993d8d3d-f80e-4225-855a-9daf8ed7ea97 verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571 + architecture="ia64" +elif [ "${machine}" = "ppc64le" ]; then + # There's no support of PPC in the discoverable partitions specification yet, so skip the rest for now + echo OK >/testok + exit 0 else echo "Unexpected uname -m: ${machine} in testsuite-50.sh, please fix me" exit 1 @@ -118,8 +127,8 @@ losetup -d ${loop} ROOT_UUID=$(systemd-id128 -u show $(head -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-) VERITY_UUID=$(systemd-id128 -u show $(tail -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-) -systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root","partition_uuid":"'$ROOT_UUID'","fstype":"squashfs","architecture":"x86-64","verity":"yes","node":' -systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root-verity","partition_uuid":"'$VERITY_UUID'","fstype":"DM_verity_hash","architecture":"x86-64","verity":null,"node":' +systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root","partition_uuid":"'$ROOT_UUID'","fstype":"squashfs","architecture":"'$architecture'","verity":"yes","node":' +systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root-verity","partition_uuid":"'$VERITY_UUID'","fstype":"DM_verity_hash","architecture":"'$architecture'","verity":null,"node":' systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F "MARKER=1" systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F -f $os_release