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