-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Zend: Add tests for offsets and containers #12723
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
Were these tests generated? Can't we do something like Zend/tests/runtime_compile_time_binary_operands.phpt? |
Nope, I wrote them by hand, as I wasn't planning on doing all types of containers and offsets generally. Also, what is relevant is the output here, as it is, sadly, inconsistent. This is kinda related to #7173 and some other stuff I am planning to RFC to make the behaviour more consistent around offsets. Edit: I could merge the int, float, and true cases as those behave identically. Edit 2: I suppose I could write that sort of test to check the compile and run-time behaviour to be identical and keep the variable tests to check for the output. |
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'm not sure, if this is the best way to keep tests.
Now I have to look into 3 or 4 files to just understand the difference.
Anyway, this is better than nothing.
It's great these test caught the bugs.
The two JIT related fixes look right.
Few XFAIL-ed tests with "Cannot access offset of type %s on array" vs "Cannot access offset of type %s in isset or empty" error messages mismatch seem related to your changes. Do you need my help to fix them?
a6a79c9
to
58cfe39
Compare
I'm trying to work on a test that generates the compile time and run time behaviour so that a lot of the current tests can be removed, see
Should I backport them to 8.2?
I don't think they are related to my changes, and yes I would need your help @dstogov as I think the issue is that in the normal VM the coalesce operator ( But I might also be wrong. |
yes. Please do it in a separate PR with a minimal tests.
Could you please create a bug report with a minimal case(s) and assign it to me. I'll take care when have time. |
Both JIT related issues are fixed. You may remove the XFAIL marks. |
@dstogov can you have a look at the |
string(5) "value" | ||
} | ||
|
||
Deprecated: Automatic conversion of false to array is deprecated in /home/girgias/Dev/php-src/Zend/tests/offsets/appending_containers.php on line 17 |
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 hard-coded path should be replaced by %s
This failure is not related to JIT but to
|
@Girgias Please xfail this test in the meantime if you can't solve the issue so the build stays green. Edit: Oops, I think I commented on the wrong PR. In any case, this seems to be fixed on release branches now, thanks 🙂 |
3c15682
to
8013180
Compare
I might add some tests for The only thing that I feel is slightly related to #7173 is the behaviour around |
…ArrayAccess for userland
This has highlighted some JIT bugs, I think I managed to fix 2 of them, but the following tests are marked as XFAIL:
Any suggestion to reduce the test duplication is also welcomed.