Skip to content
Snippets Groups Projects
Verified Commit 06a2b9d4 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Fix hanging socat

In socat 1.8.0.3, it appears a change was made to cause this command to hang indefinitely in case ignoreeof
is provided. As such, we're using a local timeout to kill the connection after some time has passed.
parent ea899f73
No related branches found
No related tags found
No related merge requests found
Pipeline #120709 passed
......@@ -98,7 +98,7 @@ test-basic-qemu-bios:
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
-nographic &
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 sudo true; do sleep 1; done"
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -t0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -T0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
test-cloudimg-qemu-bios:
stage: test
......@@ -141,7 +141,7 @@ test-cloudimg-qemu-bios:
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 true; do sleep 1; done"
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 pacman -Q bat tmux tree; do sleep 1; done"
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 test -f /runcmd_successful ; do sleep 1; done"
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -t0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -T0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
test-basic-qemu-uefi-x64:
stage: test
......@@ -163,7 +163,7 @@ test-basic-qemu-uefi-x64:
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
-nographic &
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 sudo true; do sleep 1; done"
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -t0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -T0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
test-cloudimg-qemu-uefi-x64:
stage: test
......@@ -209,7 +209,7 @@ test-cloudimg-qemu-uefi-x64:
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 true; do sleep 1; done"
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 pacman -Q bat tmux tree; do sleep 1; done"
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 test -f /runcmd_successful ; do sleep 1; done"
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -t0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
- 'echo "{\"execute\": \"guest-network-get-interfaces\"}" | socat -T0 -,ignoreeof unix-connect:/tmp/qga.sock | jq -e "any(.return.[]; .name == \"lo\")"'
publish:
stage: publish
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment