test: drop unnecessary disablement of pipefail
This commit is contained in:
@@ -210,12 +210,10 @@ sleep 3
|
|||||||
[[ ! -f "/tmp/i-lose-my-logs" ]]
|
[[ ! -f "/tmp/i-lose-my-logs" ]]
|
||||||
systemctl stop forever-print-hola
|
systemctl stop forever-print-hola
|
||||||
|
|
||||||
set +o pipefail
|
|
||||||
# https://github.com/systemd/systemd/issues/15528
|
# https://github.com/systemd/systemd/issues/15528
|
||||||
journalctl --follow --file=/var/log/journal/*/* | head -n1 | grep .
|
journalctl --follow --file=/var/log/journal/*/* | head -n1 | grep .
|
||||||
# https://github.com/systemd/systemd/issues/24565
|
# https://github.com/systemd/systemd/issues/24565
|
||||||
journalctl --follow --merge | head -n1 | grep .
|
journalctl --follow --merge | head -n1 | grep .
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
# https://github.com/systemd/systemd/issues/26746
|
# https://github.com/systemd/systemd/issues/26746
|
||||||
rm -f /tmp/issue-26746-log /tmp/issue-26746-cursor
|
rm -f /tmp/issue-26746-log /tmp/issue-26746-cursor
|
||||||
|
|||||||
@@ -174,9 +174,7 @@ EOF
|
|||||||
test -n "$found"
|
test -n "$found"
|
||||||
|
|
||||||
journalctl --sync
|
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'
|
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
|
# 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"
|
assert_eq "$(systemctl show --property=SysFSPath --value /sys/subsystem/net/devices/hoge)" "/sys/devices/virtual/net/hoge"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -528,9 +528,7 @@ EOF
|
|||||||
# become idle again. 'Lock' signal is sent out for each session, we have at
|
# 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.
|
# least one session, so minimum of 2 "Lock" signals must have been sent.
|
||||||
journalctl --sync
|
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'
|
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,
|
# 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.
|
# so we must track how many happened before sleeping to check we have extra.
|
||||||
@@ -541,10 +539,8 @@ EOF
|
|||||||
|
|
||||||
# Wait again
|
# Wait again
|
||||||
journalctl --sync
|
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 "$((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.'
|
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() {
|
testcase_session_properties() {
|
||||||
|
|||||||
@@ -933,12 +933,10 @@ systemd-sysext merge --no-reload
|
|||||||
systemd-sysext unmerge --no-reload
|
systemd-sysext unmerge --no-reload
|
||||||
systemd-sysext merge
|
systemd-sysext merge
|
||||||
journalctl --sync
|
journalctl --sync
|
||||||
set +o pipefail
|
|
||||||
# "journalctl -u foo.service" may not work as expected, especially entries for _TRANSPORT=stdout,
|
# "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.
|
# for short-living services or when the service manager generates debugging logs.
|
||||||
# Instead, SYSLOG_IDENTIFIER= should be reliable for stdout. Let's use it.
|
# 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$'
|
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
|
systemd-sysext unmerge --no-reload
|
||||||
# Grep on the Warning to find the warning helper mentioning the daemon reload.
|
# Grep on the Warning to find the warning helper mentioning the daemon reload.
|
||||||
systemctl status foo.service 2>&1 | grep -q -F "Warning"
|
systemctl status foo.service 2>&1 | grep -q -F "Warning"
|
||||||
|
|||||||
@@ -305,13 +305,11 @@ testcase_mount_ratelimit() {
|
|||||||
|
|
||||||
# Figure out if we have entered the rate limit state.
|
# 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.
|
# 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
|
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
|
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
|
journalctl --sync
|
||||||
timeout 2m journalctl -u init.scope --since="$ts" -n all --follow | grep -m 1 -q -F '(mount-monitor-dispatch) left rate limit'
|
timeout 2m journalctl -u init.scope --since="$ts" -n all --follow | grep -m 1 -q -F '(mount-monitor-dispatch) left rate limit'
|
||||||
fi
|
fi
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
# Verify that the mount units are always cleaned up at the end.
|
# 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.
|
# Give some time for units to settle so we don't race between exiting the rate limit state and cleaning up the units.
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ enable_ipv6() {
|
|||||||
|
|
||||||
monitor_check_rr() (
|
monitor_check_rr() (
|
||||||
set +x
|
set +x
|
||||||
set +o pipefail
|
|
||||||
local since="${1:?}"
|
local since="${1:?}"
|
||||||
local match="${2:?}"
|
local match="${2:?}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user