test: make sure the strace process is indeed dead

It may take a few moments for the strace process to properly terminate
and write all logs to the backing storage
This commit is contained in:
Frantisek Sumsal 2019-07-01 19:53:45 +02:00
parent ac14396d02
commit 56425e54a2
2 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,7 @@ test_setup() {
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
setup_basic_environment
inst_binary mktemp
dracut_install mktemp
# mask some services that we do not want to run in these tests
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service

View File

@ -38,6 +38,8 @@ startStrace() {
stopStrace() {
kill -s TERM $COPROC_PID
# Make sure the strace process is indeed dead
while kill -0 $COPROC_PID 2>/dev/null; do sleep 0.1; done
}
startJournalctl() {
@ -80,6 +82,7 @@ writeTestUnitNUMAPolicy() {
pid1ReloadWithStrace() {
startStrace
systemctl daemon-reload
sleep $sleepAfterStart
stopStrace
}