summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-44.sh
blob: fbd4ae692c0c4df6288dadea1f952d1987cc8471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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

touch /testok