Merge pull request #27283 from mrc0mmand/assorted-test-tweaks

test: a bunch of assorted tweaks, Saturday edition
This commit is contained in:
Yu Watanabe
2023-04-16 19:39:58 +09:00
committed by GitHub
12 changed files with 245 additions and 4 deletions
+3
View File
@@ -3,6 +3,9 @@
set -eux
set -o pipefail
# Check if the colored --version output behaves correctly
SYSTEMD_COLORS=256 systemctl --version
# Check if we properly differentiate between a full systemd setup and a "light"
# version of it that's done during daemon-reexec
#
+1
View File
@@ -175,6 +175,7 @@ sleep 3
systemctl kill --signal=SIGKILL systemd-journald
sleep 3
[[ ! -f "/i-lose-my-logs" ]]
systemctl stop forever-print-hola
# https://github.com/systemd/systemd/issues/15528
journalctl --follow --file=/var/log/journal/*/* | head -n1 || [[ $? -eq 1 ]]
+22
View File
@@ -7,6 +7,27 @@ set -o pipefail
# shellcheck source=test/units/assert.sh
. "$(dirname "$0")"/assert.sh
test_timedatectl() {
timedatectl --no-pager --help
timedatectl --version
timedatectl
timedatectl --no-ask-password
timedatectl status --machine=testuser@.host
timedatectl status
timedatectl show
timedatectl show --all
timedatectl show -p NTP
timedatectl show -p NTP --value
timedatectl list-timezones
if ! systemd-detect-virt -qc; then
systemctl enable --runtime --now systemd-timesyncd
timedatectl timesync-status
timedatectl show-timesync
fi
}
restore_timezone() {
if [[ -f /tmp/timezone.bak ]]; then
mv /tmp/timezone.bak /etc/timezone
@@ -256,6 +277,7 @@ EOF
: >/failed
test_timedatectl
test_timezone
test_adjtime
test_ntp
+5
View File
@@ -150,6 +150,11 @@ systemd-analyze cat-config /etc/systemd/system.conf >/dev/null
systemd-analyze cat-config systemd/system.conf systemd/journald.conf >/dev/null
systemd-analyze cat-config systemd/system.conf foo/bar systemd/journald.conf >/dev/null
systemd-analyze cat-config foo/bar
# security
systemd-analyze security
systemd-analyze security --json=off
systemd-analyze security --json=pretty | jq
systemd-analyze security --json=short | jq
if [[ ! -v ASAN_OPTIONS ]]; then
# check that systemd-analyze cat-config paths work in a chroot