dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From 37614533602981aa3757cd3e847f184fdae1432e Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Thu, 3 Nov 2022 11:33:13 +0100
Subject: [PATCH] test: cover a couple of previously missed analyze code paths

(cherry picked from commit 8b1879bcd0ed1168f5ad35a3dd0e213a31a2ee42)

Related #2138081
---
 test/units/testsuite-65.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/units/testsuite-65.sh b/test/units/testsuite-65.sh
index 89406a108e..1f34308b44 100755
--- a/test/units/testsuite-65.sh
+++ b/test/units/testsuite-65.sh
@@ -45,8 +45,16 @@ systemd-analyze dot "systemd-*.service" >/dev/null
 systemd-analyze dump >/dev/null
 systemd-analyze dump "*" >/dev/null
 systemd-analyze dump "*.socket" >/dev/null
+systemd-analyze dump "*.socket" "*.service" aaaaaaa ... >/dev/null
 systemd-analyze dump systemd-journald.service >/dev/null
 (! systemd-analyze dump "")
+# unit-files
+systemd-analyze unit-files >/dev/null
+systemd-analyze unit-files systemd-journald.service >/dev/null
+systemd-analyze unit-files "*" >/dev/null
+systemd-analyze unit-files "*" aaaaaa "*.service" "*.target" >/dev/null
+systemd-analyze unit-files --user >/dev/null
+systemd-analyze unit-files --user "*" aaaaaa "*.service" "*.target" >/dev/null
 # unit-paths
 systemd-analyze unit-paths
 systemd-analyze unit-paths --user
@@ -103,6 +111,7 @@ systemd-analyze calendar '*-* *:*:*'
 systemd-analyze calendar --iterations=5 '*-* *:*:*'
 systemd-analyze calendar --iterations=50 '*-* *:*:*'
 systemd-analyze calendar --iterations=0 '*-* *:*:*'
+systemd-analyze calendar --iterations=5 '01-01-22 01:00:00'
 systemd-analyze calendar --base-time=yesterday --iterations=5 '*-* *:*:*'
 (! systemd-analyze calendar --iterations=0 '*-* 99:*:*')
 (! systemd-analyze calendar --base-time=never '*-* *:*:*')
@@ -114,12 +123,14 @@ systemd-analyze timestamp -- -1
 systemd-analyze timestamp yesterday now tomorrow
 (! systemd-analyze timestamp yesterday never tomorrow)
 (! systemd-analyze timestamp 1)
+(! systemd-analyze timestamp '*-2-29 0:0:0')
 (! systemd-analyze timestamp "")
 # timespan
 systemd-analyze timespan 1
 systemd-analyze timespan 1s 300s '1year 0.000001s'
 (! systemd-analyze timespan 1s 300s aaaaaa '1year 0.000001s')
 (! systemd-analyze timespan -- -1)
+(! systemd-analyze timespan '*-2-29 0:0:0')
 (! systemd-analyze timespan "")
 # cat-config
 systemd-analyze cat-config systemd/system.conf >/dev/null