Skip to content

fix broken pipe error in tests/common/util #3910

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

Conversation

Joining7943
Copy link
Contributor

Fixes #3895

@tertsdiepraam
Copy link
Member

Interesting! How did you get to this solution and why does it work?

@Joining7943
Copy link
Contributor Author

Yes it is. I came to this solution because I usually use a buffer like BufReader or BufWriter around a bare Stdin, Stdout etc. to reduce system calls and improve performance. I tried different things, but this one stopped the test failing. However, I'm not sure about the reason. I guess it's because the BufWriter calls flush() when dropped.

@sylvestre sylvestre force-pushed the 3895-fix-broken-pipe-error-in-utils branch 2 times, most recently from 462d68a to 07b04b0 Compare September 9, 2022 18:43
@sylvestre sylvestre force-pushed the 3895-fix-broken-pipe-error-in-utils branch from 07b04b0 to 795ab1f Compare September 10, 2022 09:10
@Joining7943
Copy link
Contributor Author

Is tests/common/util somehow involved in the gnu tests?

@sylvestre
Copy link
Contributor

No, we have this test failing from time to time (tee)

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.

tail: tests with piped input are failing randomly with broken pipe on macos when no output is expected
3 participants