mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
f49467b959
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.
20 lines
428 B
Bash
Executable File
20 lines
428 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ex
|
|
|
|
systemd-analyze log-level debug
|
|
|
|
systemd-run -p LogNamespace=foobar echo "hello world"
|
|
|
|
journalctl --namespace=foobar --sync
|
|
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 && { echo 'unexpected success'; exit 1; }
|
|
|
|
systemd-analyze log-level info
|
|
|
|
echo OK >/testok
|
|
|
|
exit 0
|