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

Introduce moz-webgpu-cts process-reports #13

Closed
3 tasks done
ErichDonGubler opened this issue Oct 19, 2023 · 7 comments · Fixed by #14
Closed
3 tasks done

Introduce moz-webgpu-cts process-reports #13

ErichDonGubler opened this issue Oct 19, 2023 · 7 comments · Fixed by #14

Comments

@ErichDonGubler
Copy link
Collaborator

ErichDonGubler commented Oct 19, 2023

As the developer of Firefox implementation of WebGPU, it's sometimes difficult to quickly adjust test expectations after I make changes to Firefox. CTS comprises a large set of tests and files that I work with, and it can be time-consuming and even error-prone to find the right places in files to edit by hand when I receive WPT reports from CI.

I would like tool assistance in adjusting expectations in the correct locations, given a set of WPT reports in JSON format (i.e., wptreport.json) files that are provided by CTS runs in CI (./mach wpt --log-wptreport=…). I recognize that there are different heuristics that I may want to use for adjusting expected outcomes, so I'll offer users their choice of adjustment heuristic. The data I'll use is:

  1. WPT metadata files underneath testing/web-platform/mozilla/meta/webgpu. Per test and subtest, there will be a set of expected outcomes per platform.
  2. One or more WPT execution reports. For tests relevant to WebGPU, there will be tests within the webgpu test path that have actual outcomes on a specific platform noted. These can be combined to form a set of actual outcomes in a structure otherwise very similar to (1).

Overall flow of moz-webgpu-cts process-reports

The flow of the tool should be:

  1. Gather a bunch of WPT reports using a tool like ./mach wpt-fetch-logs try:2639473c8ba1d33e13a3108db7660cc8cbed91f5 or (eventually) Add moz-webgpu-cts dl-reports subcommand #18.
  2. Invoke moz-webgpu-cts process-reports --preset=… <wpt-report-json-paths…>
    1. Note that we are specifying a --preset=… here. This is a required argument to specify a heuristic for making changes based on reports. Presets are intended to be very coarse grained configurations that match typical workflows for convenience. We do not provide other options for finer-grained configuration at this time, but we plan to do so, and track progress on such at Tracking issue: moz-webgpu-cts update-expected options #26.
    2. Also accept 0 or more --glob <glob> options, which correspond to wax globs.
    3. Validate that the base name of each file path passed directly or yielded by the glob ends with wptreport.json. If any paths fail validation, emit a warning on stderr.
  3. Gather data sets (1) and (2), as noted above. Data set (2) will be derived from file paths to JSON blobs containing WPT reports that are enumerated in the previous step.
    1. If there are any parsing or validation errors with either data set, then bail on the entire invocation with a set of error(s) that seem appropriate.
  4. Compare expected test and subtest outcomes in metadata with reported outcomes by platform and build profile. Use the provided --preset=… to determine how to react in each comparison case.
    1. For this MVP, it is acceptable if all metadata files are re-emitted, even when not substantially changed; such a case would be as if somebody invoked the fmt subcommand (see Implement moz-webgpu-cts fmt for normalizing expectation formatting #8).
    2. EDIT: already implemented.

Technical notes

Fortunately, we have a lot of good data to work with. We already implement parsing of WPT metadata as of #5, so the remaining work is:

@ErichDonGubler ErichDonGubler changed the title Add moz-webgpu-cts adjust-exps <wptreport.json glob> Add moz-webgpu-cts adjust-exps <wptreport.json glob> for new permanent test outcomes Oct 19, 2023
@ErichDonGubler ErichDonGubler self-assigned this Oct 19, 2023
@jimblandy

This comment was marked as resolved.

@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler ErichDonGubler changed the title Add moz-webgpu-cts adjust-exps <wptreport.json glob> for new permanent test outcomes Add moz-webgpu-cts adjust-exps --stage=permas <wptreport.json paths> for new permanent test outcomes Oct 23, 2023
@ErichDonGubler ErichDonGubler changed the title Add moz-webgpu-cts adjust-exps --stage=permas <wptreport.json paths> for new permanent test outcomes Add moz-webgpu-cts adjust-exps --stage=permas … for new permanent test outcomes Oct 23, 2023
@ErichDonGubler

This comment was marked as off-topic.

@ErichDonGubler ErichDonGubler changed the title Add moz-webgpu-cts adjust-exps --stage=permas … for new permanent test outcomes Add moz-webgpu-cts adjust-exps --mode=permas … for new permanent test outcomes Oct 24, 2023
@ErichDonGubler ErichDonGubler changed the title Add moz-webgpu-cts adjust-exps --mode=permas … for new permanent test outcomes Add moz-webgpu-cts adjust-exps --mode=match-reports… for new permanent test outcomes Oct 24, 2023
@ErichDonGubler ErichDonGubler changed the title Add moz-webgpu-cts adjust-exps --mode=match-reports… for new permanent test outcomes Introduce moz-webgpu-cts adjust-exps with --mode=match-reported… Oct 24, 2023
@ErichDonGubler ErichDonGubler changed the title Introduce moz-webgpu-cts adjust-exps with --mode=match-reported… Introduce moz-webgpu-cts adjust-exps with --on-conflict=change-to-reported… Oct 24, 2023
@ErichDonGubler ErichDonGubler changed the title Introduce moz-webgpu-cts adjust-exps with --on-conflict=change-to-reported… Introduce moz-webgpu-cts adjust-exps with --on-conflict=change-to-reported … Oct 24, 2023
@ErichDonGubler ErichDonGubler changed the title Introduce moz-webgpu-cts adjust-exps with --on-conflict=change-to-reported … Introduce moz-webgpu-cts adjust-exps with --on-conflict=change-to-reported Oct 24, 2023
@ErichDonGubler ErichDonGubler changed the title Introduce moz-webgpu-cts adjust-exps with --on-conflict=change-to-reported Introduce moz-webgpu-cts process-reports with --on-conflict=change-to-reported Oct 24, 2023
@ErichDonGubler

This comment was marked as outdated.

@ErichDonGubler ErichDonGubler changed the title Introduce moz-webgpu-cts process-reports with --on-conflict=change-to-reported Introduce moz-webgpu-cts process-reports Oct 26, 2023
@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants