Merge pull request #20185 from mrc0mmand/ci-tweaks

test: assorted test tweaks to address flakiness
This commit is contained in:
Frantisek Sumsal 2021-07-09 20:21:59 +02:00 committed by GitHub
commit 0de0ba573b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -11,7 +11,7 @@ TEST_NO_QEMU=1
# Using timeout because if the test fails it can loop.
# The reason is because the poweroff executed by end.service
# could turn into a reboot if the test fails.
NSPAWN_TIMEOUT=20
NSPAWN_TIMEOUT=60
# Remove this file if it exists. This is used along with
# the make target "finish". Since concrete confirmation is

View file

@ -35,6 +35,7 @@ QEMU_MEM="${QEMU_MEM:-512M}"
# To force creating a new image from scratch (eg: to encrypt it), also define
# TEST_FORCE_NEWIMAGE=1 in the test setup script.
IMAGE_NAME=${IMAGE_NAME:-default}
STRIP_BINARIES="${STRIP_BINARIES:-yes}"
TEST_REQUIRE_INSTALL_TESTS="${TEST_REQUIRE_INSTALL_TESTS:-1}"
TEST_PARALLELIZE="${TEST_PARALLELIZE:-0}"
LOOPDEV=

View file

@ -34,8 +34,9 @@ journalCursorFile="jounalCursorFile"
startStrace() {
coproc strace -qq -p 1 -o "$straceLog" -e set_mempolicy -s 1024 ${1:+"$1"}
# Wait for strace to properly "initialize"
sleep $sleepAfterStart
# Wait for strace to properly "initialize", i.e. until PID 1 has the TracerPid
# field set to the current strace's PID
while ! awk -v spid="$COPROC_PID" '/^TracerPid:/ {exit !($2 == spid);}' /proc/1/status; do sleep 0.1; done
}
stopStrace() {