summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-44.sh
blob: da779a6901c97de92e41a0b2f59ee6a754eaba2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux

systemd-analyze log-level debug

systemd-run --wait -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)

systemd-analyze log-level info

echo OK >/testok

exit 0