Skip to content

Start cleaning up staging/sm tests#4463

Merged
ptomato merged 142 commits intotc39:mainfrom
anba:sm-ext
Sep 17, 2025
Merged

Start cleaning up staging/sm tests#4463
ptomato merged 142 commits intotc39:mainfrom
anba:sm-ext

Conversation

@anba
Copy link
Contributor

@anba anba commented Apr 30, 2025

Changes:

  • Replace harness functions from harness/sm with standard test262 harness functions.
  • Remove now unused harness functions from harness/sm.
  • Both changes should help a bit for Deal with slow staging/sm tests #4402, because there's now less harness code to execute.
  • Avoid testing error messages, because error messages aren't standardised.
  • Remove unused files.
  • Remove noStrict flag where possible.
  • And many more clean-ups and fixes.

I've also identified a couple of tests which should be removed from test262, because they test non-standard behaviour:

  • Tests for Function.caller.
  • Date.parse with non-standard inputs.
  • Tests how accurate Math functions are.
  • If the ToString output for bound functions contains the function name.
  • Large RegExp tests.
  • Cycle detection tests.
  • Tests using SpiderMonkey shell functions like disassemble or timeout.

In a follow-up PR I can remove these tests, too.

@anba anba requested review from a team as code owners April 30, 2025 12:43
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Reviewed up to "Remove non262-extensions-shell.js"

Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Reviewed up to "Replace makeIterator with inline definitions"

Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Reviewed up to "Remove assertThrownErrorContains"

@ptomato
Copy link
Contributor

ptomato commented Sep 17, 2025

We discussed this in the test262 maintainers meeting today. We'll just go ahead and merge it; these are staging tests and so should not be held up for this long by review, and the improvements have been good so far. I'll address the existing comments, and there's one more thing I'd like to do — I'd like to convert the BUGNUMBER assignments to comments with links to Mozilla's bug tracker, rather than just removing them, as I think the history can be relevant to future consumers of these tests. After I do that, I'll merge it.

@ptomato ptomato force-pushed the sm-ext branch 2 times, most recently from 87fe7e6 to 29a218f Compare September 17, 2025 22:49
The history of why these tests exist can be useful context for future
consumers of the test suite.
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Stamp

@ptomato ptomato merged commit 6251b55 into tc39:main Sep 17, 2025
12 checks passed
@iamstolis
Copy link
Contributor

The following tests started to fail after this PR:

  • staging/sm/Math/acosh-exact.js
  • staging/sm/Math/atanh-exact.js
  • staging/sm/Math/log1p-exact.js
  • staging/sm/Math/trunc.js
    These tests use ONE_MINUS_EPSILON and/or ONE_PLUS_EPSILON but they do not declared dependency on sm/non262-Math-shell.js (where these constants are defined).

I have created #4588 to track this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants