-
Notifications
You must be signed in to change notification settings - Fork 851
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
Can we discuss how to update test262? #817
Comments
Could you please show me the rhino branch with the updated test262? |
Sorry I didn't answer this before -- yes, I love the idea of making test262
easier to keep up to date and thanks, Vlad, for all your work on this in
the past.
Keeping a list of "passing" tests seems reasonable -- I hope that over time
we can expand this.
Do we know what we're missing in order to pass those new test files? I know
that there's some syntax that we're missing but I wonder how hard it'd be
to implement really.
Finally, are the tests that never complete possibly related to Promise
support? (that's the case with the compatibility table code). I had made
progress on a Promise implementation but then I have not had much time
recently and I don't know how that works.
And as tuchida@ mentioned -- working on Rhino is a hobby for pretty much
all of us at this point!
…On Thu, Jan 28, 2021 at 2:15 PM tuchida ***@***.***> wrote:
Could you please show me the rhino branch with the updated test262?
I'm currently implementing this in BigInt for ES2020, but I'm having
trouble with a lack of test cases.
(I make it as a hobby, so don't expect it.)
master...tuchida:es2020-bigint
<master...tuchida:es2020-bigint>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#817 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I2YYR74257FLF5HSURTS4HOYVANCNFSM4VQPBMUQ>
.
|
I implemented the Exponentiation Operator (**) and test262 is now very slow. Some of this is due to bugs in Rhino. rhino/src/org/mozilla/javascript/NativeArray.java Lines 865 to 870 in 70b9f49
MAX_SAFE_INTEGER (2 ** 53 - 1) is casted as int (max 2 ** 31 - 1). It is usually useful to have the option to skip these. |
@tuchida I don't have a branch yet, as the task to update to the latest tests version blew up a bit, hence why I decided to post a question here. @gbrail I found a few harness files (which are part of test262 project and are used within the tests) which don't work:
These problems can be overcome by having rhino-specific copies, although this would increase the work-load to support these copies in future (and we may need to test these custom versions?). Also, while 1, 3 and 5 can be overcome quite easily, and perhaps 2, I wasn't quite sure what to do with 4. So this, coupled with my other points in the original post made me pause to ask what other contributors think. Please let me know any thoughts. Thanks! |
How about using Babel or something to transpile |
In-between the link is moved forward to the head an also the properties file is adjusted. Will have a look at your other points. |
Just saw there are more recent versions available in the repo. Will have a look if i can move this even more. |
Instead of moving from exclusion list to a PASS list, what about somehow using (the output of) Test262SuiteTest to automatically update test262.properties to make all the necessary exclusions and remove obsolete exclusions? |
As I've created a Template Literal implementation,. I tried running the latest test262 suite, but it hangs on this test: https://github.com/tc39/test262/blob/main/test/built-ins/Array/prototype/concat/arg-length-near-integer-limit.js Also when I try this code in the Rhino Shell it hangs. Note that in FF it properly throws, in GC it doesn't. I tried excluding the test in test262.properties, however, the exclusion mechanism through test262 only takes care of not failing the testrun, but it still runs the test (I guess in order to report excluded tests that are passing) This means I really have to delete the .js file in order to progress in testing. Do we need a stronger exclusion mechanism, that doesn't run the test if excluded? EDIT: the good news is that it's only 1 .js file in the current test262 master that causes a hang: if deleted, the entire suite runs with |
That test case that runs forever sounds like a bug that we should fix
actually, and maybe a dangerous one. I'm not sure what's happening -- maybe
we didn't understand the syntax, but parsed it anyway, so we ignored the
get and just tried to concatenate an empty array with 2^53 values in it?
…On Fri, May 21, 2021 at 5:44 AM Paul Bakker ***@***.***> wrote:
As I've created a Template Literal implementaiton,. I tried running the
latest test262 suite, but it hangs on this test:
https://github.com/tc39/test262/blob/main/test/built-ins/Array/prototype/concat/arg-length-near-integer-limit.js
Also when I try this code in the Rhino Shell it hangs. Note that in FF it
properly throws, in GC it doesn't.
I tried excluding the test in test262.properties, however, the exclusion
mechanism through test262 only takes care of not failing the testrun, but
it still runs the test (I guess in order to report excluded tests that are
passing)
This means I really have to delete the .js file in order to progress in
testing. Do we need a stronger exclusion mechanism, that doesn't run the
test if excluded?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#817 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I25G2FBLJ7IGJ25KQPLTOZIRFANCNFSM4VQPBMUQ>
.
|
Traced that bug a bit, created a case: #906 |
Another question: if I run the testsuite, I get this failure:
If I try the first line of code in Chrome, I get the same result:
Can it be that this is an issue when running the tests on Windows? I'm running the tests on Windows in Git Bash. The problem btw is the .toUpperCase(): if that is removed, all is fine |
With regards to the above comment: I tested in Ubuntu (through WSL on Windows) and then I'm not getting the failures in testsrc\tests\ecma\String\15.5.4.12-3.js, which leads me to believe the test might be invalid Another strange thing: if I run
However, when I run just |
As a guess, these tests are only failing with one opt level - if i'm correct this is a major problem with out implementation. |
Somewhere over the weekend I had the realization that that might be the case, so I quickly ran the tests three times, once with optLevel -1, once with optlevel 1 and once with optLevel 9, but, judging quickly, it didn't seem that all the tests that were reported as not breaking on optLevel -1 were failing on one of the other two optLevels. But then again: I only quickly glanced at the result, as it was weekend afterall :-) |
Yes - will provide a first patch that will output details about this tests and the optlevel/strict for these. Then we have to have a look at this. |
Have opened a new issue to track these kind of tests #909 |
Any thoughts on the breaking tests on windows mentioned in #817 (comment)? Also wondering whether it might be Java version related. Am running against Java 15 (Zulu). Which also brings the question of which Java version(s) Rhino supports and against which versions it is tested. Based on release notes I gather Rhino requires Java 8 and up? |
Right now Rhino builds on Java 8 and is tested on Java 8. Ideally Rhino
would test cleanly on everything from Java 8 up to whatever the latest is.
We can tweak Travis (I don't think I have to be the one to do it) to test
on additional JVM versions and I think that in fact that is a good idea.
There are a few things that would be easier to code if we built with Java
9. Pretty soon (I think we need a release soon first) we should change the
build to build on Java 9 but target Java 8 bytecode and also test on Java
8. There is still lots of stuff in the world using Java 8, including lots
of Android phones where people seem to use a lot of Rhino.
…On Wed, May 26, 2021 at 12:02 AM Paul Bakker ***@***.***> wrote:
Any thoughts on the breaking tests on windows mentioned in #817 (comment)
<#817 (comment)>?
Also wondering whether it might be Java version related. Am running
against Java 15 (Zulu).
Which also brings the question of which Java version(s) Rhino supports and
against which versions it is tested. Based on release notes I gather Rhino
requires Java 8 and up?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#817 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I2ZAKPXZWBSIXB2FA2TTPSMGRANCNFSM4VQPBMUQ>
.
|
Tnx @gbrail, I'll create a PR to add to the readme's about the Java version supported by Rhino and about which version to test on |
Regarding my previous comment about some tests failing on windows (#817 (comment)): The EcmaScript spec has this to say about it:
So, this leads me to conclude that the testcode is faulty. Shall I go ahead and remove the tests that are failing on Windows? |
Come to think of it: isn't the whole testsrc\tests\ecma\String\15.5.4.12-3.js file a bit pointless? As what it is testing is basically if Java on the OS on which it's running is using Unicode correctly. |
Created #920 for the comments above |
@gbrail What is gained by building with Java 9 and targeting Java 8? I tried to search around, but couldn't find much. I did find this, but I'm not sure if this is what you were referring to https://github.com/bsideup/jabel |
We have two things coming up, I think, that would benefit from being able
to use Java 9 capabilities but the ability to fall back when Java 8 is
being run:
1. There's a Java 9 function that we need to use to check the visibility
of private modules using the Java module system -- without it, later Java
versions will start to fail when Rhino is used to automate Java code.
There's an issue in there somewhere with a discussion that ended up with
questions about how to build things.
2. Java 9 has the "dynalink" module, which will make it easier to
optimize some of the big hairy ScriptRuntime methods using invokedynamic by
trying various methods and then caching the one that works at a particular
call site. I tried writing a simplified version of the dynalink package,
but it'd be easier to use the real thing.
Both of these things CAN be coded in a way that will compile with Java 8,
but it's going to be annoying to work that way.
…On Tue, Jun 1, 2021 at 1:37 PM tonygermano ***@***.***> wrote:
@gbrail <https://github.com/gbrail> What is gained by building with Java
9 and targeting Java 8? I tried to search around, but couldn't find much. I
did find this, but I'm not sure if this is what you were referring to
https://github.com/bsideup/jabel
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#817 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I24GTLUHJRGQWTJAJ2LTQVAJNANCNFSM4VQPBMUQ>
.
|
FYI now that Template Literals are in, we can update to the latest commit on master for the test262 submodule. Just to let all know: am working on updating test262.properties accordingly, hopefully making the process of doing to easier for the future |
Sigh... still cant update to the latest commit on test262's main branch: as of last September the harness code depends on rest parameters... Anyone already tried to take a stab at that? Doesn't look like it: #652 |
Having rest parameter support will be great. |
:-) for sure, but which missing feature wouldn't? Did have a look, the semantics of rest params aren't that complicated, just trying to figure out where to convert the last + excess argument values on a function call to a rest param array. Tried to do this in
The other place that might be a possibility would be rhino/src/org/mozilla/javascript/Interpreter.java Line 1871 in d2b2c9e
Any thoughts on which would be best (or if none of those: how else to go about it)? |
Dear maintainers,
I thought it may be a good idea to update test262 to its current point.
It's taken me a lot longer (many hours) than I thought it would. The following issues cropped up:
I feel like it may make this whole process easier if we change the approach to running these tests. Namely, keep a version-controlled list of tests that PASS (rather than what is currently done, which is keep a list of failing tests).
When fixing bugs, it would be possible to add to the list of passing tests.
When syncing with the test262 repo, we have a different mode which runs all the non-passing tests to see which ones pass and can be (automatically) included (we still need a hard exclude to prevent running the ones that never complete). This mode can also be triggered to search for tests that are passing following commits to rhino. One potential complication would be that currently we can include whole directories, so would need to see how this fits with the new approach.
Please let me know what you think about the above, and whether there is an easier way to maintain test262 in sync.
Thanks!
The text was updated successfully, but these errors were encountered: