From 1aab0a5b10632eb5b6644dfbfc253e31e79fd2ea Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 18 Sep 2024 03:50:43 +0900 Subject: [PATCH 1/2] test: minor coding style fixlets Follow-up for a37640653cab108bb2cfdcba7e9422cced925e95. --- test/units/TEST-86-MULTI-PROFILE-UKI.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/units/TEST-86-MULTI-PROFILE-UKI.sh b/test/units/TEST-86-MULTI-PROFILE-UKI.sh index 21d2349200..042cc59419 100755 --- a/test/units/TEST-86-MULTI-PROFILE-UKI.sh +++ b/test/units/TEST-86-MULTI-PROFILE-UKI.sh @@ -17,9 +17,9 @@ if test -f /run/systemd/stub/profile; then fi echo "CURRENT MEASUREMENT:" /usr/lib/systemd/systemd-measure --current -if test -f /run/systemd/tpm2-pcr-signature.json ; then +if test -f /run/systemd/tpm2-pcr-signature.json; then echo "CURRENT SIGNATURE:" - jq < /run/systemd/tpm2-pcr-signature.json + jq /root/encrypted.secret + echo -n "geheim" >/root/encrypted.secret cryptsetup luksFormat -q --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --use-urandom /root/encrypted.raw --key-file=/root/encrypted.secret systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs= --tpm2-public-key=/root/pcrsign.public.pem --unlock-key-file=/root/encrypted.secret /root/encrypted.raw rm -f /root/encrypted.secret @@ -62,12 +62,12 @@ else if [ "$ID" = "profile0" ]; then grep -v testprofile /proc/cmdline - echo "default $(basename "$CURRENT_UKI")@profile1" > "$(bootctl -p)/loader/loader.conf" + echo "default $(basename "$CURRENT_UKI")@profile1" >"$(bootctl -p)/loader/loader.conf" reboot exit 0 elif [ "$ID" = "profile1" ]; then grep testprofile1=1 /proc/cmdline - echo "default $(basename "$CURRENT_UKI")@profile2" > "$(bootctl -p)/loader/loader.conf" + echo "default $(basename "$CURRENT_UKI")@profile2" >"$(bootctl -p)/loader/loader.conf" reboot exit 0 elif [ "$ID" = "profile2" ]; then From d265b8afb7c7ca0fb2ef1a580d703d121da5d1c6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 18 Sep 2024 03:58:58 +0900 Subject: [PATCH 2/2] test: drop unused test.sh for TEST-86-MULTI-PROFILE-UKI The test cannot run with the bash test runner, as it requires python. Hence, test.sh is not necessary. Follow-up for a37640653cab108bb2cfdcba7e9422cced925e95. --- test/TEST-86-MULTI-PROFILE-UKI/test.sh | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100755 test/TEST-86-MULTI-PROFILE-UKI/test.sh diff --git a/test/TEST-86-MULTI-PROFILE-UKI/test.sh b/test/TEST-86-MULTI-PROFILE-UKI/test.sh deleted file mode 100755 index 1b06a109d2..0000000000 --- a/test/TEST-86-MULTI-PROFILE-UKI/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -e - -TEST_DESCRIPTION="Test Multi-Profile UKI Boots" - -# shellcheck source=test/test-functions -. "${TEST_BASE_DIR:?}/test-functions" - -do_test "$@"