mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08: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)
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user