Skip to content

fix: improve midline-flush tests #17

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

limeytexan
Copy link
Contributor

Observed failed tests for the aarch64-linux build job on hydra.nixos.org:

I'm confident the usleep() statements within midline-flush.c handles ordering within a single invocation, but the test does demonstrate that it must be possible to schedule overlapping program invocations, where the first flush of a subsequent invocation can be processed in advance of the final flush from a preceding one.

This update adds a numeric identifier to each hello() and goodbye() statement, which should help to identify exactly which invocation gets out of order, and also adds a sleep in the main shell loop to make it that much less likely that this race will occur.

Observed failed tests for the aarch64-linux build job on hydra.nixos.org:
- https://hydra.nixos.org/build/292893102/nixlog/1

I'm confident the usleep() statements within midline-flush.c handles ordering
within a single invocation, but the test does demonstrate that it must be
possible to schedule overlapping program invocations, where the first flush
of a subsequent invocation can be processed in advance of the final flush from
a preceding one.

This update adds a numeric identifier to each hello() and goodbye() statement,
which should help to identify exactly which invocation gets out of order, and
also adds a sleep in the main shell loop to make it that much less likely that
this race will occur.
@limeytexan limeytexan requested a review from ysndr April 1, 2025 08:32
Copy link
Contributor

@ysndr ysndr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure if this really fixes anything, but it should make it easier to see when it goes wrong in a test.

@limeytexan limeytexan merged commit a44c831 into main Apr 1, 2025
4 checks passed
@limeytexan limeytexan deleted the fix/midline-flush.add-sleep-between-invocations branch April 1, 2025 09:25
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