]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add space-separated test for LogFilterPatterns
authorLuca Boccassi <bluca@debian.org>
Mon, 2 Oct 2023 22:30:19 +0000 (23:30 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 12 Oct 2023 12:11:42 +0000 (13:11 +0100)
test/testsuite-04.units/logs-filtering.service
test/units/testsuite-04.LogFilterPatterns.sh

index 06210868fd2719ff0a552c4ec052d6d5f3512006..6e2af9a2a148bf9534e2406c0ab3e6267b886aa8 100644 (file)
@@ -2,5 +2,5 @@
 Description=Log filtering unit
 
 [Service]
-ExecStart=sh -c 'while true; do echo "Logging from the service, and ~more~"; sleep .25; done'
+ExecStart=sh -c 'while true; do echo "Logging from the service, and ~more~ foo bar"; sleep .25; done'
 SyslogLevel=notice
index 3f889d1294ac377d86746df4c0c58927de028176..41cf8a1fa1d3851f5c09b1e8d9e07fae3fc6d5af 100755 (executable)
@@ -78,6 +78,10 @@ if is_xattr_supported; then
     add_logs_filtering_override "logs-filtering.service" "10-allow-with-escape-char" "\\\\x7emore~"
     [[ -n $(run_service_and_fetch_logs "logs-filtering.service") ]]
 
+    add_logs_filtering_override "logs-filtering.service" "11-reset" ""
+    add_logs_filtering_override "logs-filtering.service" "12-allow-with-spaces" "foo bar"
+    [[ -n $(run_service_and_fetch_logs "logs-filtering.service") ]]
+
     add_logs_filtering_override "delegated-cgroup-filtering.service" "00-allow-all" ".*"
     [[ -n $(run_service_and_fetch_logs "delegated-cgroup-filtering.service") ]]