mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #5630
5630: Fix integration tests hanging on crashes r=def- a=ChillerDragon When the client or server crash the fifo will be dead then the cleanup command hangs at echo "quit" > client1.fifo because the fifo is not responding and thus it is stuck there. which causes the user to probably ctrl+c at some point which then avoids client2 to be quit which might not have crashed So this commit checks if a fail_client1.txt file exits and if it crashed already it will skip the call to the broken fifo <!-- What is the motivation for the changes of this pull request --> ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [x] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
This commit is contained in:
commit
944c80a6e5
|
@ -55,9 +55,20 @@ function kill_all() {
|
|||
fi
|
||||
|
||||
sleep 1
|
||||
echo "shutdown" > server.fifo
|
||||
echo "quit" > client1.fifo
|
||||
echo "quit" > client2.fifo
|
||||
if [[ ! -f fail_server.txt ]]
|
||||
then
|
||||
echo "[*] shutting down server"
|
||||
echo "shutdown" > server.fifo
|
||||
fi
|
||||
local i
|
||||
for ((i=1;i<3;i++))
|
||||
do
|
||||
if [[ ! -f fail_client$i.txt ]]
|
||||
then
|
||||
echo "[*] shutting down client$i"
|
||||
echo "quit" > "client$i.fifo"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
|
|
Loading…
Reference in a new issue