From f49467b959cb612fba053d152b446eff70184d4d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 8 Apr 2021 09:47:04 +0200 Subject: [PATCH] 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. --- test/units/testsuite-44.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/units/testsuite-44.sh b/test/units/testsuite-44.sh index 78022cb545b..0badb711259 100755 --- a/test/units/testsuite-44.sh +++ b/test/units/testsuite-44.sh @@ -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 -- 2.47.3