Skip to content
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

[wptrunner] Add results for expected subtests that didn't run #44125

Conversation

jonathan-j-lee
Copy link
Contributor

This feature allows Chromium CI to fail builds for changes that forget to clean up expectations for deleted or renamed subtests. Subtest validity cannot be checked statically.

Assuming infrastructure/metadata/**/*.ini are not stale, this change has no effect on WPT CI or non-Chrome browser testing.

Closes #43499

This feature allows Chromium CI to fail builds [0] for changes that
forget to clean up expectations for deleted or renamed subtests. Subtest
validity cannot be checked statically.

Assuming `infrastructure/metadata/**/*.ini` are not stale, this change
has no effect on WPT CI or non-Chrome browser testing.

Closes web-platform-tests#43499

[0]: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1678090/overview
@jonathan-j-lee jonathan-j-lee marked this pull request as ready for review January 22, 2024 20:31
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Jan 22, 2024
subtest_names = {subtest.name for subtest in subtest_results}
for unknown_subtest in sorted(test.subtests - subtest_names):
subtest_results.append(
test.subtest_result_cls(unknown_subtest, "NOTRUN", message=None))
Copy link
Contributor

Choose a reason for hiding this comment

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

If unknown subtests get a "NOTRUN" result, what should rebaseline tool behave?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible we do something in the 'WPTResultsProcessor'? If there are unknown subtests, we simply flag that test as unexpectedly failed (if it is not a crash/timeout previously).

We do not need to do anything in Wptrunner, especially we do not need to retry such 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.

This is usually an unexpected wptrunner NOTRUN, which is mapped to ResultDB unexpected failure that the rebaseline tool downloads.

An expected NOTRUN like:

This is a testharness.js-based test.
[NOTRUN] does not exist

won't cause a failure by itself. Ideally, we wouldn't check subtests anyway during a timeout, so maybe this isn't important to clean up.

Is it possible we do something in the 'WPTResultsProcessor'?

We can try, since WPTResultsProcessor can handle the above expected NOTRUN case. WPTResultsProcessor needs to manipulate the wpt run exit code too then.

Copy link
Contributor

Choose a reason for hiding this comment

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

WPTResultsProcessor needs to manipulate the wpt run exit code too then.

Oh yes. I think we could log the return code from Wptrunner, but the actual return value should be decided by run_wpt_tests.py.

@WeizhongX
Copy link
Contributor

So do we plan to move the change to WPTResultsProcessor or we still want to pursue this change?

Reading your response to my question "If unknown subtests get a "NOTRUN" result, what should rebaseline tool behave?", are you saying for a removed subtest, our plan is to change the expectation for that subtest to "NOTRUN", instead of remove the subtest from the baseline?

@jonathan-j-lee
Copy link
Contributor Author

Not pursuing this change. Since https://crrev.com/c/5112639 streamlines the result logic significantly, it might be easier to wait for that to land first, which requires solving #44134.

our plan is to change the expectation for that subtest to "NOTRUN", instead of remove the subtest from the baseline?

No, the removed subtest should be removed, not added as NOTRUN. I realized that's why this PR doesn't work.

@jonathan-j-lee jonathan-j-lee deleted the wptrunner/notrun branch January 29, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a method to keep test metadata in sync with test when subtests are deleted or renamed.
4 participants