test: drop unnecessary disablement of pipefail

This commit is contained in:
Yu Watanabe
2025-07-08 18:36:09 +09:00
parent 054464ad52
commit d6b3793704
6 changed files with 0 additions and 13 deletions

View File

@@ -210,12 +210,10 @@ sleep 3
[[ ! -f "/tmp/i-lose-my-logs" ]]
systemctl stop forever-print-hola
set +o pipefail
# https://github.com/systemd/systemd/issues/15528
journalctl --follow --file=/var/log/journal/*/* | head -n1 | grep .
# https://github.com/systemd/systemd/issues/24565
journalctl --follow --merge | head -n1 | grep .
set -o pipefail
# https://github.com/systemd/systemd/issues/26746
rm -f /tmp/issue-26746-log /tmp/issue-26746-cursor

View File

@@ -174,9 +174,7 @@ EOF
test -n "$found"
journalctl --sync
set +o pipefail
timeout -v 30 journalctl _PID=1 _COMM=systemd --since "$since" -n all --follow | grep -m 1 -q -F 'foobar: systemd-udevd failed to process the device, ignoring: File exists'
set -o pipefail
# check if the invalid SYSTEMD_ALIAS property for the interface foobar is ignored by PID1
assert_eq "$(systemctl show --property=SysFSPath --value /sys/subsystem/net/devices/hoge)" "/sys/devices/virtual/net/hoge"
}

View File

@@ -528,9 +528,7 @@ EOF
# become idle again. 'Lock' signal is sent out for each session, we have at
# least one session, so minimum of 2 "Lock" signals must have been sent.
journalctl --sync
set +o pipefail
timeout -v 35 journalctl -b -u systemd-logind.service --since="$ts" -n all --follow | grep -m 1 -q 'Sent message type=signal .* member=Lock'
set -o pipefail
# We need to know that a new message was sent after waking up,
# so we must track how many happened before sleeping to check we have extra.
@@ -541,10 +539,8 @@ EOF
# Wait again
journalctl --sync
set +o pipefail
timeout -v 35 journalctl -b -u systemd-logind.service --since="$ts" -n all --follow | grep -m "$((locks + 1))" -q 'Sent message type=signal .* member=Lock'
timeout -v 35 journalctl -b -u systemd-logind.service --since="$ts" -n all --follow | grep -m 2 -q -F 'System idle. Will be locked now.'
set -o pipefail
}
testcase_session_properties() {

View File

@@ -933,12 +933,10 @@ systemd-sysext merge --no-reload
systemd-sysext unmerge --no-reload
systemd-sysext merge
journalctl --sync
set +o pipefail
# "journalctl -u foo.service" may not work as expected, especially entries for _TRANSPORT=stdout,
# for short-living services or when the service manager generates debugging logs.
# Instead, SYSLOG_IDENTIFIER= should be reliable for stdout. Let's use it.
timeout -v 30s journalctl -b SYSLOG_IDENTIFIER=echo _TRANSPORT=stdout -o cat -n all --follow | grep -m 1 -q '^foo$'
set -o pipefail
systemd-sysext unmerge --no-reload
# Grep on the Warning to find the warning helper mentioning the daemon reload.
systemctl status foo.service 2>&1 | grep -q -F "Warning"

View File

@@ -305,13 +305,11 @@ testcase_mount_ratelimit() {
# Figure out if we have entered the rate limit state.
# If the infra is slow we might not enter the rate limit state; in that case skip the exit check.
set +o pipefail
journalctl --sync
if timeout 2m journalctl -u init.scope --since="$ts" -n all --follow | grep -m 1 -q -F '(mount-monitor-dispatch) entered rate limit'; then
journalctl --sync
timeout 2m journalctl -u init.scope --since="$ts" -n all --follow | grep -m 1 -q -F '(mount-monitor-dispatch) left rate limit'
fi
set -o pipefail
# Verify that the mount units are always cleaned up at the end.
# Give some time for units to settle so we don't race between exiting the rate limit state and cleaning up the units.

View File

@@ -53,7 +53,6 @@ enable_ipv6() {
monitor_check_rr() (
set +x
set +o pipefail
local since="${1:?}"
local match="${2:?}"