test: cover --json= for the blame and identify-tpm2 verbs

Both verbs render through arg_json_format_flags but --json= was rejected for
them until the previous commit, and nothing in TEST-65-ANALYZE exercised it.
Add coverage in line with the other JSON-capable verbs.

identify-tpm2 is only invoked when has-tpm2 reports full support, as it
fails with EOPNOTSUPP when built without TPM2 support.
This commit is contained in:
Ivan Kruglov
2026-08-12 03:54:33 -07:00
parent b3f76af401
commit 46a91a1867
+3
View File
@@ -18,6 +18,7 @@ systemd-analyze time || :
systemd-analyze critical-chain || :
# blame
systemd-analyze blame
systemd-analyze blame --json=pretty
systemd-run --wait --user --pipe -M testuser@.host systemd-analyze blame --no-pager
(! systemd-analyze blame --global)
# plot
@@ -1139,6 +1140,8 @@ systemd-analyze security --instance=tmp systemd-growfs@.service
systemd-analyze has-tpm2 ||:
if systemd-analyze has-tpm2 -q ; then
echo "have tpm2"
systemd-analyze identify-tpm2
systemd-analyze identify-tpm2 --json=pretty
else
echo "have no tpm2"
fi