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
tests/*server.pl: flush output before executing subprocess #7530
Conversation
81ac86c
to
02439a5
Compare
Also avoid shell processes staying around by using exec. Closes curl#7530
02439a5
to
218c649
Compare
After a total of 5 CI runs without any AppVeyor or Azure test failing in this PR, I am quite sure this will finally fix their flakiness. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit message needs an explanation as to why this change is necessary, and any references where it is discussed.
Also avoid shell processes staying around by using exec. This is necessary to avoid output data being buffering inside the process chain of Perl, Bash/Shell and our test server binaries. On non-Windows systems the exec will also make the subprocess replace the intermediate shell, but on Windows it will at least bind the processes together since there is no real fork or exec available. See: https://cygwin.com/cygwin-ug-net/highlights.html and: https://docs.microsoft.com/cpp/c-runtime-library/exec-wexec-functions Reviewed-by: Daniel Stenberg Reviewed-by: Jay Satiro Closes curl#7530
218c649
to
70f11be
Compare
@jay thanks, please take another look at the updated commit message. |
Also avoid shell processes staying around by using exec. This is necessary to avoid output data being buffering inside the process chain of Perl, Bash/Shell and our test server binaries. On non-Windows systems the exec will also make the subprocess replace the intermediate shell, but on Windows it will at least bind the processes together since there is no real fork or exec available. See: https://cygwin.com/cygwin-ug-net/highlights.html and: https://docs.microsoft.com/cpp/c-runtime-library/exec-wexec-functions Reviewed-by: Daniel Stenberg Reviewed-by: Jay Satiro Closes curl#7530
70f11be
to
37cbd11
Compare
Also avoid shell processes staying around by using exec. This is necessary to avoid output data being buffering inside the process chain of Perl, Bash/Shell and our test server binaries. On non-Windows systems the exec will also make the subprocess replace the intermediate shell, but on Windows it will at least bind the processes together since there is no real fork or exec available. See: https://cygwin.com/cygwin-ug-net/highlights.html and: https://docs.microsoft.com/cpp/c-runtime-library/exec-wexec-functions Reviewed-by: Daniel Stenberg Reviewed-by: Jay Satiro Closes curl#7530
Although flushing the output buffers reduced the flakiness of the curl test suite on Windows already, some tests were still randomly failing. This is another attempt to fix it.
37cbd11
to
15e0f50
Compare
Unfortunately even this PR is experiencing some flakiness again, although it seems reduced. That is why I added another commit for testing purposes. |
Works for me! |
I think it needs a reference to the issue(s) where the random CI fails are discussed, so it can be understood why it is necessary to make this change to avoid the buffering. In other words the issue that you are fixing. I'm not really opposed to this but I think that there may be some underlying issue here that we just aren't aware of that is causing these problems. That said if it is an improvement then 👍 |
Thanks! @jay it is hard to link to a single issue or instance of this flakiness since we have been experiencing that on Azure and AppVeyor since months now. You can see it in the test analytics of Azure quite well: You will see the test failures spread quite evenly over a lot of tests (test 2100 was recently fixed by you): |
Although flushing the output buffers reduced the flakiness of the curl test suite on Windows already, some tests were still randomly failing. This is another attempt to fix it. Follow up to curl#7530
Although flushing the output buffers reduced the flakiness of the curl test suite on Windows already, some tests were still randomly failing. This is another attempt to fix it. Follow up to curl#7530
Although flushing the output buffers reduced the flakiness of the curl test suite on Windows already, some tests were still randomly failing. This is another attempt to fix it. Follow up to curl#7530
Although flushing the output buffers reduced the flakiness of the curl test suite on Windows already, some tests were still randomly failing. This is another attempt to fix it. Follow up to curl#7530
Although flushing the output buffers reduced the flakiness of the curl test suite on Windows already, some tests were still randomly failing. This is another attempt to fix it. Follow up to curl#7530
Although flushing the output buffers reduced the flakiness of the curl test suite on Windows already, some tests were still randomly failing. This is another attempt to fix it. Follow up to curl#7530
Also avoid shell processes staying around by using exec. This may solve the random Windows CI issues.