TEST-44: fix test

We were grepping for 'hello world', and in the namespace we would
match on 'hello world', and outside, on 'echo "hello world"'. When
the condition check was fixed, the test gave a false positive.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-04-08 20:21:50 +02:00
parent d933ccd30b
commit f49467b959
+4 -4
View File
@@ -6,11 +6,11 @@ systemd-analyze log-level debug
systemd-run -p LogNamespace=foobar echo "hello world"
journalctl --namespace=foobar --sync
journalctl --namespace=foobar >/tmp/hello-world
journalctl >/tmp/no-hello-world
journalctl -o cat --namespace=foobar >/tmp/hello-world
journalctl -o cat >/tmp/no-hello-world
grep "hello world" /tmp/hello-world
! grep "hello world" /tmp/no-hello-world
grep "^hello world$" /tmp/hello-world
grep "^hello world$" /tmp/no-hello-world && { echo 'unexpected success'; exit 1; }
systemd-analyze log-level info