Merge pull request #28147 from mrc0mmand/drop-workarounds
test: drop a couple of workarounds for recently fixed issues
This commit is contained in:
@@ -37,11 +37,8 @@ curl -Lfs --header "Accept: text/plain" http://localhost:19531/entries | \
|
||||
grep -qE " $TEST_TAG\[[0-9]+\]: $TEST_MESSAGE"
|
||||
curl -Lfs --header "Accept: application/json" http://localhost:19531/entries | \
|
||||
jq -se ".[] | select(.MESSAGE == \"$TEST_MESSAGE\")"
|
||||
# FIXME: drop the condition once https://github.com/systemd/systemd/issues/28059 is resolved
|
||||
if ! systemd-detect-virt -cq; then
|
||||
curl -Lfs --header "Accept: application/json" http://localhost:19531/entries?boot | \
|
||||
jq -se ".[] | select(.MESSAGE == \"$TEST_MESSAGE\")"
|
||||
fi
|
||||
curl -Lfs --header "Accept: application/json" http://localhost:19531/entries?boot | \
|
||||
jq -se ".[] | select(.MESSAGE == \"$TEST_MESSAGE\")"
|
||||
curl -Lfs --header "Accept: application/json" http://localhost:19531/entries?SYSLOG_IDENTIFIER="$TEST_TAG" | \
|
||||
jq -se "length == 1 and select(.[].MESSAGE == \"$TEST_MESSAGE\")"
|
||||
# Show 10 entries starting from $BOOT_CURSOR, skip the first 5
|
||||
|
||||
@@ -28,8 +28,6 @@ if [[ -v ASAN_OPTIONS || -v UBSAN_OPTIONS ]]; then
|
||||
# With the trusted profile DynamicUser is disabled, so the storage is not in private/
|
||||
STATE_DIRECTORY=/var/lib/
|
||||
fi
|
||||
# Bump the timeout if we're running with plain QEMU
|
||||
[[ "$(systemd-detect-virt -v)" == "qemu" ]] && TIMEOUT=90 || TIMEOUT=30
|
||||
|
||||
systemd-dissect --no-pager /usr/share/minimal_0.raw | grep -q '✓ portable service'
|
||||
systemd-dissect --no-pager /usr/share/minimal_1.raw | grep -q '✓ portable service'
|
||||
@@ -49,9 +47,7 @@ systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-foo.service
|
||||
systemctl is-active minimal-app0-bar.service && exit 1
|
||||
|
||||
# Running with sanitizers may freeze the invoked service. See issue #24147.
|
||||
# Let's set timeout to improve performance.
|
||||
timeout "$TIMEOUT" portablectl "${ARGS[@]}" reattach --now --runtime /usr/share/minimal_1.raw minimal-app0
|
||||
portablectl "${ARGS[@]}" reattach --now --runtime /usr/share/minimal_1.raw minimal-app0
|
||||
|
||||
systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-bar.service
|
||||
@@ -76,7 +72,7 @@ systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-foo.service
|
||||
systemctl is-active minimal-app0-bar.service && exit 1
|
||||
|
||||
timeout "$TIMEOUT" portablectl "${ARGS[@]}" reattach --now --enable --runtime /tmp/minimal_1 minimal-app0
|
||||
portablectl "${ARGS[@]}" reattach --now --enable --runtime /tmp/minimal_1 minimal-app0
|
||||
|
||||
systemctl is-active minimal-app0.service
|
||||
systemctl is-active minimal-app0-bar.service
|
||||
@@ -100,7 +96,7 @@ grep -q -F "LogExtraFields=PORTABLE_ROOT=minimal_0.raw" /run/systemd/system.atta
|
||||
grep -q -F "LogExtraFields=PORTABLE_EXTENSION=app0.raw" /run/systemd/system.attached/app0.service.d/20-portable.conf
|
||||
grep -q -F "LogExtraFields=PORTABLE_EXTENSION_NAME_AND_VERSION=app" /run/systemd/system.attached/app0.service.d/20-portable.conf
|
||||
|
||||
timeout "$TIMEOUT" portablectl "${ARGS[@]}" reattach --now --runtime --extension /usr/share/app0.raw /usr/share/minimal_1.raw app0
|
||||
portablectl "${ARGS[@]}" reattach --now --runtime --extension /usr/share/app0.raw /usr/share/minimal_1.raw app0
|
||||
|
||||
systemctl is-active app0.service
|
||||
status="$(portablectl is-attached --extension app0 minimal_1)"
|
||||
@@ -120,13 +116,13 @@ status="$(portablectl is-attached --extension app1 minimal_0)"
|
||||
|
||||
# Ensure that adding or removing a version to the image doesn't break reattaching
|
||||
cp /usr/share/app1.raw /tmp/app1_2.raw
|
||||
timeout "$TIMEOUT" portablectl "${ARGS[@]}" reattach --now --runtime --extension /tmp/app1_2.raw /usr/share/minimal_1.raw app1
|
||||
portablectl "${ARGS[@]}" reattach --now --runtime --extension /tmp/app1_2.raw /usr/share/minimal_1.raw app1
|
||||
|
||||
systemctl is-active app1.service
|
||||
status="$(portablectl is-attached --extension app1_2 minimal_1)"
|
||||
[[ "${status}" == "running-runtime" ]]
|
||||
|
||||
timeout "$TIMEOUT" portablectl "${ARGS[@]}" reattach --now --runtime --extension /usr/share/app1.raw /usr/share/minimal_1.raw app1
|
||||
portablectl "${ARGS[@]}" reattach --now --runtime --extension /usr/share/app1.raw /usr/share/minimal_1.raw app1
|
||||
|
||||
systemctl is-active app1.service
|
||||
status="$(portablectl is-attached --extension app1 minimal_1)"
|
||||
|
||||
Reference in New Issue
Block a user