Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify VM is running before running tests #315

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

red-robby
Copy link
Contributor

@red-robby red-robby commented Feb 25, 2023

Update the testing script to verify the QEMU VM is running before proceeding with the tests. This is done via sending commands to the QEMU Monitor.

@red-robby
Copy link
Contributor Author

We're now using the command socat, so I've also updated the docker files. The configuration needs to be updated on CircleCI for the checks to pass.

@dayeol
Copy link
Contributor

dayeol commented Feb 26, 2023

The CI doesn't automatically build the docker images for test, so if there's any new dependency, we must build the docker image manually.

Besides, why do you need socat? is it to check if the socket is open?

@red-robby
Copy link
Contributor Author

@dayeol We're using socat to establish a connection with the socket. We send info status to the QEMU Monitor via this socket to query if the VM is running. See the relevant lines below (from travis.sh).

result=$( (echo "info status" && sleep 1) | \
	socat - unix-connect:$MONITOR_SOCKET | \
	grep -oF "running")

We could use nc (netcat) instead, but the Docker image also lacks this command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants