mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-05-28 13:05:47 +03:00
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:
parent
ac14396d02
commit
56425e54a2
@ -16,7 +16,7 @@ test_setup() {
|
|||||||
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
|
||||||
|
|
||||||
setup_basic_environment
|
setup_basic_environment
|
||||||
inst_binary mktemp
|
dracut_install mktemp
|
||||||
|
|
||||||
# mask some services that we do not want to run in these tests
|
# 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
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
||||||
|
@ -38,6 +38,8 @@ startStrace() {
|
|||||||
|
|
||||||
stopStrace() {
|
stopStrace() {
|
||||||
kill -s TERM $COPROC_PID
|
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() {
|
startJournalctl() {
|
||||||
@ -80,6 +82,7 @@ writeTestUnitNUMAPolicy() {
|
|||||||
pid1ReloadWithStrace() {
|
pid1ReloadWithStrace() {
|
||||||
startStrace
|
startStrace
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
sleep $sleepAfterStart
|
||||||
stopStrace
|
stopStrace
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user