1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
systemd/test/units/testsuite-44.sh
Zbigniew Jędrzejewski-Szmek 128db0aa00 test: drop uses of "&& { echo 'unexpected success'; exit 1; }"
Brief is sweet.
2023-04-24 21:58:35 +02:00

21 lines
443 B
Bash
Executable File

#!/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