Skip to content

Conversation

@lygstate
Copy link
Contributor

@lygstate lygstate commented Dec 28, 2020

Fix the test262 timeout on Windows

Use the platform independent python threading.Timer instead of the unix only timeout tool.

The timeout error are like the following things:

C:\Users\lygstate>timeout -version
Error: The specified timeout (/T) value is invalid. The valid range is from -1 to 99999 seconds.

C:\Users\lygstate>timeout 0 python
Error: invalid syntax. The default option does not allow more than '1' times.
Type "TIMEOUT /?" to learn how to use it.

timeout option are added for future ES5.1 test262 usage
in pull request
#4391

The timeout setting to 60 to getting maximal tolerance
By doing this also fixes tests for es2015:
built-ins/decodeURIComponent/S15.1.3.2_A2.5_T1.js
built-ins/decodeURI/S15.1.3.1_A2.5_T1.js

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com

Copy link
Member

@akosthekiss akosthekiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, change commit message. The language used throughout the project is English.

Please, fix pylint check errors.

@lygstate lygstate force-pushed the timeout-windows branch 6 times, most recently from f6de887 to 26fef50 Compare December 29, 2020 04:24
@lygstate lygstate force-pushed the timeout-windows branch 2 times, most recently from 34876a0 to 2ad8357 Compare December 29, 2020 14:15
@ossy-szeged
Copy link
Contributor

The change looks good, but I would change the commit log to be more descriptive. Now it says what was wrong, but it should say what have been done in the commit. For example:

Fix the test262 timeout on Windows

Use the platform independent python threading.Timer instead of the unix only timeout tool.

@lygstate
Copy link
Contributor Author

The change looks good, but I would change the commit log to be more descriptive. Now it says what was wrong, but it should say what have been done in the commit. For example:

Fix the test262 timeout on Windows

Use the platform independent python threading.Timer instead of the unix only timeout tool.

done

@lygstate
Copy link
Contributor Author

Please, change commit message. The language used throughout the project is English.

Please, fix pylint check errors.

Fixed

})
(code, out, err) = TestCase.execute(command)
# Only es2015 or esnext need the timeout option.
(code, out, err) = TestCase.execute(command, 60)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add timeout option for the usage in es5.1,
setting to 60 for pass two time consuming tests.

Copy link
Contributor

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 it is a good idea to have 60 seconds timeout unconditionally,
because language/statements/for-of/iterator-next-reference.js in ES2015-test262
is a wrong test (outdated because of spec change) and stucks in an infinite loop.

Increasing timeout means that running ES2015-test262 will take an extra minute because of this wrong test.
8 seconds timeout is enough to remove 2 slow tests from es2015 excludelist. And tests run in 80 seconds
for me with 8 seconds timeout, but in 80+57 seconds with 60 seconds timeout.

In nutshell: I would keep general timeout as low as possible, but we could add extra timeout for ES5.1 if it is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

60 is needed to pass two new tests

Copy link
Contributor Author

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 it is a good idea to have 60 seconds timeout unconditionally,
because language/statements/for-of/iterator-next-reference.js in ES2015-test262
is a wrong test (outdated because of spec change) and stucks in an infinite loop.

Increasing timeout means that running ES2015-test262 will take an extra minute because of this wrong test.
8 seconds timeout is enough to remove 2 slow tests from es2015 excludelist. And tests run in 80 seconds
for me with 8 seconds timeout, but in 80+57 seconds with 60 seconds timeout.

In nutshell: I would keep general timeout as low as possible, but we could add extra timeout for ES5.1 if it is necessary.

60s needed to pass

These two tests consume lot of time in jerryscript, maybe it's a performance issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bottleneck is the wrong language/statements/for-of/iterator-next-reference.js in test262-es2015. If we increase the timeout, we unnecessarily increase the runtime, because we have to wait to kill this wrong test. Otherwise the 2 unskipped es2015 test is also covered by esnext, because test262 maintainers know these are slow tests and refactored them to be faster. So we don't loose anything if we keep the timeout as is and leave these tests skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bottleneck is the wrong language/statements/for-of/iterator-next-reference.js in test262-es2015. If we increase the timeout, we unnecessarily increase the runtime, because we have to wait to kill this wrong test. Otherwise the 2 unskipped es2015 test is also covered by esnext, because test262 maintainers know these are slow tests and refactored them to be faster. So we don't loose anything if we keep the timeout as is and leave these tests skipped.

Not that simple, the debug version build jerryscript are slower, we need more time tolerance, and that won't increate the total test262 running time much, because tests are running in parallel, the testes consume lot of time won't be a bottleneck.

Copy link
Contributor Author

@lygstate lygstate Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ossy-szeged Revert to 5 seconds.

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lygstate lygstate force-pushed the timeout-windows branch 3 times, most recently from 0083443 to d4fd6f5 Compare January 13, 2021 03:59
@lygstate lygstate force-pushed the timeout-windows branch 2 times, most recently from 9c532cb to d4fd6f5 Compare January 13, 2021 04:02
@lygstate lygstate requested a review from akosthekiss January 15, 2021 04:10
@lygstate lygstate force-pushed the timeout-windows branch 3 times, most recently from 385549a to a460fd0 Compare January 15, 2021 17:16
@lygstate
Copy link
Contributor Author

@akosthekiss timeout parameter removed, please take a look

Use the platform independent python threading.Timer instead of the unix only timeout tool.

The timeout error are like the following things:

```
C:\Users\lygstate>timeout -version
Error: The specified timeout (/T) value is invalid. The valid range is from -1 to 99999 seconds.

C:\Users\lygstate>timeout 0 python
Error: invalid syntax. The default option does not allow more than '1' times.
Type "TIMEOUT /?" to learn how to use it.
```

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
Copy link
Member

@akosthekiss akosthekiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akosthekiss akosthekiss added tools Related to the tooling scripts windows Windows specific labels Jan 16, 2021
Copy link
Contributor

@ossy-szeged ossy-szeged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ossy-szeged ossy-szeged merged commit 2bad20a into jerryscript-project:master Jan 16, 2021
@lygstate lygstate deleted the timeout-windows branch January 17, 2021 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Related to the tooling scripts windows Windows specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants