-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix for Bug #74719 #3006
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
Fix for Bug #74719 #3006
Conversation
|
||
function runtest() { | ||
} | ||
?> |
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.
This test looks a bit too complicated for what it is testing. Did you adapt it from another test file? I'm guessing that the original test was specifically dealing with include path handling, which is not really relevant here.
The test for this change should not be much more than a successful fopen() call with null context. An absolute (__DIR__
based) path can be used to be absolutely sure that include path or cwd don't matter.
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.
Okay I'll update the test, and you're right I did, wasn't sure of the format so based on the other fopen tests. Do you think the change to fopen_variation4 is okay?
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.
It might be better to keep all the inputs and only adjust the output in variant4, but really it's fine either way. After all those cases will be tested here.
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.
I'll update my test and the new ones accordingly tonight
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.
@nikic I have updated the test changing the expected output in the variation files, with the exception of unlink-error*
where I have removed the tests, it seemed a bit wrong to have tests meant to produce errors output true
, if you think it should be a change instead of deletion 0eb19a8 has the changed value.
Looking through the file, it looks like a bunch of other functions like mkdir() and rmdir() also use |
Okay. A comment in the issue also mentioned fwrite should that be looked at too? |
@alexanderholman The fwrite() case is a bit tricky because it's a potentially BC breaking change (currently null will be interpreted as 0 in weak typing mode, which means write nothing, while adding explicit support for null would turn it into write everything). As such, I would leave that part alone for now. |
update all `Z_PARAM_RESOURCE` references to `Z_PARAM_RESOURCE_EX` where context argument is available
additional tests required |
…nlink, mkdir and rmdir
fix output expected to be in correct order
… test AppVeyor -- not part of bug
Merged as a01de10 with some more simplifications to the new test file. Thanks! |
Fix for bug #74719 to allow
NULL
context infopen
without warning e.g.:Replaces #3005