From 46a91a1867dc76f5d0254993ff42d5d7a55fd946 Mon Sep 17 00:00:00 2001 From: Ivan Kruglov Date: Wed, 12 Aug 2026 03:54:33 -0700 Subject: [PATCH] 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. --- test/units/TEST-65-ANALYZE.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/units/TEST-65-ANALYZE.sh b/test/units/TEST-65-ANALYZE.sh index a470883aff..05a7b7f0c1 100755 --- a/test/units/TEST-65-ANALYZE.sh +++ b/test/units/TEST-65-ANALYZE.sh @@ -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