diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-01-25 15:56:30 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-01-25 20:50:44 +0100 |
commit | 2ecc7a5bca1b3dedfbef1ef44ec0d4b3fe0a5112 (patch) | |
tree | b649b14dc30394f81f07a60b7f02440b5eed1938 /test | |
parent | Merge pull request #26195 from mrc0mmand/update-uapi (diff) | |
download | systemd-2ecc7a5bca1b3dedfbef1ef44ec0d4b3fe0a5112.tar.xz systemd-2ecc7a5bca1b3dedfbef1ef44ec0d4b3fe0a5112.zip |
repart: Add roothash to output of all verity siblings
This can be used to match verity partitions together using the repart
JSON output.
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/testsuite-58.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh index e83df97067..8b52a435e6 100755 --- a/test/units/testsuite-58.sh +++ b/test/units/testsuite-58.sh @@ -819,7 +819,12 @@ EOF --certificate="$defs/verity.crt" \ "$imgs/verity") - roothash=$(jq -r ".[] | select(.type == \"root-${architecture}-verity\") | .roothash" <<< "$output") + drh=$(jq -r ".[] | select(.type == \"root-${architecture}\") | .roothash" <<< "$output") + hrh=$(jq -r ".[] | select(.type == \"root-${architecture}-verity\") | .roothash" <<< "$output") + srh=$(jq -r ".[] | select(.type == \"root-${architecture}-verity-sig\") | .roothash" <<< "$output") + + assert_eq "$drh" "$hrh" + assert_eq "$hrh" "$srh" # Check that we can dissect, mount and unmount a repart verity image. (and that the image UUID is deterministic) @@ -828,9 +833,9 @@ EOF return fi - systemd-dissect "$imgs/verity" --root-hash "$roothash" - systemd-dissect "$imgs/verity" --root-hash "$roothash" --json=short | grep -q '"imageUuid":"1d2ce291-7cce-4f7d-bc83-fdb49ad74ebd"' - systemd-dissect "$imgs/verity" --root-hash "$roothash" -M "$imgs/mnt" + systemd-dissect "$imgs/verity" --root-hash "$drh" + systemd-dissect "$imgs/verity" --root-hash "$drh" --json=short | grep -q '"imageUuid":"1d2ce291-7cce-4f7d-bc83-fdb49ad74ebd"' + systemd-dissect "$imgs/verity" --root-hash "$drh" -M "$imgs/mnt" systemd-dissect -U "$imgs/mnt" } |