richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
ac3a84
From 266baa71dbb336d9c2eb1e4e7db3983477cc6ce0 Mon Sep 17 00:00:00 2001
ac3a84
From: Frantisek Sumsal <frantisek@sumsal.cz>
ac3a84
Date: Thu, 3 Nov 2022 10:59:38 +0100
ac3a84
Subject: [PATCH] test: cover legacy/deprecated systemd-analyze verbs
ac3a84
ac3a84
They're no longer documented since 26e1e97345 but still work.
ac3a84
ac3a84
(cherry picked from commit 926d95cd4c209b8c292829511542b11d7c43e662)
ac3a84
ac3a84
Related #2138081
ac3a84
---
ac3a84
 test/units/testsuite-65.sh | 13 ++++++++++++-
ac3a84
 1 file changed, 12 insertions(+), 1 deletion(-)
ac3a84
ac3a84
diff --git a/test/units/testsuite-65.sh b/test/units/testsuite-65.sh
ac3a84
index ece6b8734e..89406a108e 100755
ac3a84
--- a/test/units/testsuite-65.sh
ac3a84
+++ b/test/units/testsuite-65.sh
ac3a84
@@ -6,7 +6,7 @@ set -eux
ac3a84
 # shellcheck source=test/units/assert.sh
ac3a84
 . "$(dirname "$0")"/assert.sh
ac3a84
 
ac3a84
-systemd-analyze log-level debug
ac3a84
+systemctl log-level debug
ac3a84
 export SYSTEMD_LOG_LEVEL=debug
ac3a84
 
ac3a84
 # Sanity checks
ac3a84
@@ -19,6 +19,17 @@ systemd-analyze time || :
ac3a84
 systemd-analyze blame || :
ac3a84
 systemd-analyze critical-chain || :
ac3a84
 systemd-analyze plot >/dev/null || :
ac3a84
+# legacy/deprecated options (moved to systemctl, but still usable from analyze)
ac3a84
+systemd-analyze log-level
ac3a84
+systemd-analyze log-level "$(systemctl log-level)"
ac3a84
+systemd-analyze get-log-level
ac3a84
+systemd-analyze set-log-level "$(systemctl log-level)"
ac3a84
+systemd-analyze log-target
ac3a84
+systemd-analyze log-target "$(systemctl log-target)"
ac3a84
+systemd-analyze get-log-target
ac3a84
+systemd-analyze set-log-target "$(systemctl log-target)"
ac3a84
+systemd-analyze service-watchdogs
ac3a84
+systemd-analyze service-watchdogs "$(systemctl service-watchdogs)"
ac3a84
 # dot
ac3a84
 systemd-analyze dot >/dev/null
ac3a84
 systemd-analyze dot systemd-journald.service >/dev/null