-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Add tests for uncastable streams and dataloss streams #10173
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
Conversation
db06fcf
to
23697ec
Compare
Codecov Report
@@ Coverage Diff @@
## master #10173 +/- ##
==========================================
- Coverage 68.34% 68.21% -0.13%
==========================================
Files 852 852
Lines 313348 313345 -3
==========================================
- Hits 214156 213754 -402
- Misses 99192 99591 +399
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
tests/output/sapi_windows_vt100_support_non_castable_user_stream.phpt
Outdated
Show resolved
Hide resolved
23697ec
to
3df9917
Compare
So the GD stream casting test segfaults on FreeBSD meaning there is likely a bug in it. But I can't reproduce it on Linux :/ |
1cab27e
to
f5fe9f3
Compare
f5fe9f3
to
a8b9f66
Compare
Okay reverted the can_cast drop, added a test where a stream cast actually loses data based on @arnaud-lb's script and suppress the warnings on the casts which don't actually lose data. The only thing which I'm still confused by are the new GD tests that are inconsistent between platforms and also segfaults on FreeBSD, but maybe it's best to split those into a new PR so that we can merge all these new tests. |
Yeah, this might be the best solution for now. |
15e4eb0
to
fc1f94d
Compare
Everything should be green now, but will let CI run and squash/merge afterwards and open the GD changes in it's own PR again. |
Got some "reds" already. :( |
The failed test is:
So I'll have a look at this. |
fc1f94d
to
e3925a5
Compare
The issue seems to be that the |
@devnexen do you know why the |
Addding a |
not at the moment but will have a look when I get the chance. |
e3925a5
to
540c1fc
Compare
540c1fc
to
7bcb494
Compare
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.
@Girgias I had another look on this one and all makes sense to me (the code looks good to me). It just needs rebasing / resolving conflicts and making sure that win jobs also pass.
7bcb494
to
b0cab05
Compare
I don't understand why the Windows job now hangs compared to 6 months ago. |
@Girgias It would be easiest to just remove the |
Well if GH actions Win jobs don't work, we should maybe put back AppVeyor or something that runs win. I don't really feel comfortable to merge this without any Win tests. |
Specifically I'm talking about sapi_windows_vt100_support test... |
Appveyor also doesn't work. I asked @arnaud-lb as he helped design the test and he told me those are not meant to actually work on Windows, so I'll skip them. |
Moreover, stop using php_stream_can_cast() just before a php_stream_cast()
6bd6bf3
to
3e10016
Compare
They do, thanks! |
Moreover, stop using php_stream_can_cast() just before a php_stream_cast()
This is a follow-up from #10093.
I mimicked the online test by using the same set-up as testing the HTTP wrapper locally, as I couldn't seem to trigger a data loss in any other available by default streams wrappers.
However, I think GD is broken somehow, as even prior to the change it was hanging on my non-castable user stream wrapper. Maybe it's because of how I'm trying to pass it as a wrapper?