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

xapi_stdext_unix/test: Fix intermittent systemd cram test failure #6061

Merged

Conversation

last-genius
Copy link
Contributor

Instead of sleeping and hoping for the best, wait for the background job to finish.

Instead of sleeping and hoping for the best, wait for the background job to
finish.

Signed-off-by: Andrii Sultanov <[email protected]>
@last-genius
Copy link
Contributor Author

sleep 1 is needed there because otherwise the socket file is not going to be created and test -S will fail . otherwise, this needs to be rearchitected as Edwin suggested:

you could also change how the test_systemd --server is implemented, such that it forks into the background itself, and returns only when it has successfully created the socket in the parent and the child is listening on it (you can do that by having the parent and child communicate using a pipe to confirm that the other end has called listen)

@psafont psafont added this pull request to the merge queue Oct 29, 2024
Merged via the queue into xapi-project:master with commit 94dc48c Oct 29, 2024
15 checks passed
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.

4 participants