1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-21 14:50:12 +03:00
systemd-stable/test/units/testsuite-44.sh
Zbigniew Jędrzejewski-Szmek 3776e1f2ee test: drop uses of "&& { echo 'unexpected success'; exit 1; }"
Brief is sweet.

(cherry picked from commit 128db0aa0098b58b415065c2955f9abc7fc967e1)
(cherry picked from commit f3abd451dde25086e06c56ba0b8388f64c1d306e)
(cherry picked from commit 3626aabecb8a8682caa466de711e8f6509f954ec)
2023-04-29 11:36:49 +01: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