richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
ac3a84
From 37614533602981aa3757cd3e847f184fdae1432e Mon Sep 17 00:00:00 2001
ac3a84
From: Frantisek Sumsal <frantisek@sumsal.cz>
ac3a84
Date: Thu, 3 Nov 2022 11:33:13 +0100
ac3a84
Subject: [PATCH] test: cover a couple of previously missed analyze code paths
ac3a84
ac3a84
(cherry picked from commit 8b1879bcd0ed1168f5ad35a3dd0e213a31a2ee42)
ac3a84
ac3a84
Related #2138081
ac3a84
---
ac3a84
 test/units/testsuite-65.sh | 11 +++++++++++
ac3a84
 1 file changed, 11 insertions(+)
ac3a84
ac3a84
diff --git a/test/units/testsuite-65.sh b/test/units/testsuite-65.sh
ac3a84
index 89406a108e..1f34308b44 100755
ac3a84
--- a/test/units/testsuite-65.sh
ac3a84
+++ b/test/units/testsuite-65.sh
ac3a84
@@ -45,8 +45,16 @@ systemd-analyze dot "systemd-*.service" >/dev/null
ac3a84
 systemd-analyze dump >/dev/null
ac3a84
 systemd-analyze dump "*" >/dev/null
ac3a84
 systemd-analyze dump "*.socket" >/dev/null
ac3a84
+systemd-analyze dump "*.socket" "*.service" aaaaaaa ... >/dev/null
ac3a84
 systemd-analyze dump systemd-journald.service >/dev/null
ac3a84
 (! systemd-analyze dump "")
ac3a84
+# unit-files
ac3a84
+systemd-analyze unit-files >/dev/null
ac3a84
+systemd-analyze unit-files systemd-journald.service >/dev/null
ac3a84
+systemd-analyze unit-files "*" >/dev/null
ac3a84
+systemd-analyze unit-files "*" aaaaaa "*.service" "*.target" >/dev/null
ac3a84
+systemd-analyze unit-files --user >/dev/null
ac3a84
+systemd-analyze unit-files --user "*" aaaaaa "*.service" "*.target" >/dev/null
ac3a84
 # unit-paths
ac3a84
 systemd-analyze unit-paths
ac3a84
 systemd-analyze unit-paths --user
ac3a84
@@ -103,6 +111,7 @@ systemd-analyze calendar '*-* *:*:*'
ac3a84
 systemd-analyze calendar --iterations=5 '*-* *:*:*'
ac3a84
 systemd-analyze calendar --iterations=50 '*-* *:*:*'
ac3a84
 systemd-analyze calendar --iterations=0 '*-* *:*:*'
ac3a84
+systemd-analyze calendar --iterations=5 '01-01-22 01:00:00'
ac3a84
 systemd-analyze calendar --base-time=yesterday --iterations=5 '*-* *:*:*'
ac3a84
 (! systemd-analyze calendar --iterations=0 '*-* 99:*:*')
ac3a84
 (! systemd-analyze calendar --base-time=never '*-* *:*:*')
ac3a84
@@ -114,12 +123,14 @@ systemd-analyze timestamp -- -1
ac3a84
 systemd-analyze timestamp yesterday now tomorrow
ac3a84
 (! systemd-analyze timestamp yesterday never tomorrow)
ac3a84
 (! systemd-analyze timestamp 1)
ac3a84
+(! systemd-analyze timestamp '*-2-29 0:0:0')
ac3a84
 (! systemd-analyze timestamp "")
ac3a84
 # timespan
ac3a84
 systemd-analyze timespan 1
ac3a84
 systemd-analyze timespan 1s 300s '1year 0.000001s'
ac3a84
 (! systemd-analyze timespan 1s 300s aaaaaa '1year 0.000001s')
ac3a84
 (! systemd-analyze timespan -- -1)
ac3a84
+(! systemd-analyze timespan '*-2-29 0:0:0')
ac3a84
 (! systemd-analyze timespan "")
ac3a84
 # cat-config
ac3a84
 systemd-analyze cat-config systemd/system.conf >/dev/null