mirror of
https://passt.top/passt
synced 2025-05-22 09:15:34 +02:00
test: Add wait_for() shell helper
Add a shell helper function to wait for some command to succeed - typically a test for something to be done by a background process. Use it in the context code which waits for the guest to respond to ssh-over-vsock connections. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
8978f6552b
commit
05a2c7ae3c
2 changed files with 9 additions and 3 deletions
test/lib
|
@ -63,9 +63,7 @@ EOF
|
|||
echo "ssh -F ${__ssh} ${__name}" > "${__enter}"
|
||||
|
||||
# Wait for the guest to be booted and accepting connections
|
||||
while ! ssh -F "${__ssh}" "${__name}" :; do
|
||||
sleep 0.1
|
||||
done
|
||||
wait_for ssh -F "${__ssh}" "${__name}" :
|
||||
}
|
||||
|
||||
# context_teardown() - Remove a context (leave log files intact)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue