xref: /aosp_15_r20/external/angle/doc/TestingAndProcesses.md (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# Handling Test Failures
2*8975f5c5SAndroid Build Coastguard Worker
3*8975f5c5SAndroid Build Coastguard WorkerANGLE is tested by a number of test suites, including by the ANGLE CI and Try testers, and by the
4*8975f5c5SAndroid Build Coastguard WorkerChromium FYI testers.  See pointers and explanations in the
5*8975f5c5SAndroid Build Coastguard Worker[ANGLE Wrangling](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/infra/ANGLEWrangling.md) documentation.
6*8975f5c5SAndroid Build Coastguard Worker
7*8975f5c5SAndroid Build Coastguard WorkerWe run a large number of tests for each ANGLE CL, both in ANGLE standalone and Chromium
8*8975f5c5SAndroid Build Coastguard Workerconfigurations, both pre- and post- commit.  Some tests will fail, crash, or timeout.  If these
9*8975f5c5SAndroid Build Coastguard Workercannot be addressed in a timely manner, file a bug and update test expectations files.  Timeliness
10*8975f5c5SAndroid Build Coastguard Workerdepends on the context.  For example, a Wrangler trying to unblock an AutoRoller will typically
11*8975f5c5SAndroid Build Coastguard Workersuppress failures immediately; where a developer will typically delay landing their CL in favor of
12*8975f5c5SAndroid Build Coastguard Workerfixing test failures.
13*8975f5c5SAndroid Build Coastguard Worker
14*8975f5c5SAndroid Build Coastguard Worker## Handling a Vulkan Validation Layer error
15*8975f5c5SAndroid Build Coastguard Worker
16*8975f5c5SAndroid Build Coastguard WorkerMany tests are run with an option that enables the Vulkan Validation Layers (sometimes referred to
17*8975f5c5SAndroid Build Coastguard Workeras VVL).  Validation errors will cause an otherwise-passing test to fail.
18*8975f5c5SAndroid Build Coastguard Worker
19*8975f5c5SAndroid Build Coastguard WorkerThe [vulkan-deps into ANGLE AutoRoller](https://autoroll.skia.org/r/vulkan-deps-angle-autoroll)
20*8975f5c5SAndroid Build Coastguard Workerupdates ANGLE to the top-of-tree (ToT) upstream Vulkan tools and SDK.  Sometimes validation errors
21*8975f5c5SAndroid Build Coastguard Workerare the result of bugs in the Vulkan Validation Layers, sometimes because of bugs in ANGLE.
22*8975f5c5SAndroid Build Coastguard WorkerTherefore, investigate the cause of the error and determine if it's an ANGLE bug or a Vulkan
23*8975f5c5SAndroid Build Coastguard WorkerValidation Layer bug.  For Vulkan Validation Layer bugs, file an
24*8975f5c5SAndroid Build Coastguard Worker[upstream bug](https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/new), and
25*8975f5c5SAndroid Build Coastguard Workersuppress the error.  The ANGLE Wrangler will also suppress a validation error when the
26*8975f5c5SAndroid Build Coastguard Worker`vulkan-deps` AutoRoller introduces a new validation error.  The ANGLE Wrangler isn't expected to
27*8975f5c5SAndroid Build Coastguard Workerresolve the error or diagnose an upstream bug (but it is welcome as extra credit).
28*8975f5c5SAndroid Build Coastguard Worker
29*8975f5c5SAndroid Build Coastguard WorkerHandle a validation error by doing the following:
30*8975f5c5SAndroid Build Coastguard Worker
31*8975f5c5SAndroid Build Coastguard Worker1. [File an ANGLE bug](http://anglebug.com/new). If this is an active Wrangler issue, set the Label
32*8975f5c5SAndroid Build Coastguard Worker   `Hotlist-Wrangler` on the bug.
33*8975f5c5SAndroid Build Coastguard Worker2. Add the VVL error tag to the
34*8975f5c5SAndroid Build Coastguard Worker   [kSkippedMessages](https://chromium.googlesource.com/angle/angle.git/+/8f8ca06dfb903fcc8517c69142c46c05e618f40d/src/libANGLE/renderer/vulkan/RendererVk.cpp#129)
35*8975f5c5SAndroid Build Coastguard Worker   array in `vk_renderer.cpp` file.  Follow the pattern for adding a comment with the associated bug
36*8975f5c5SAndroid Build Coastguard Worker   in the line above the VVL tag.
37*8975f5c5SAndroid Build Coastguard Worker
38*8975f5c5SAndroid Build Coastguard Worker
39*8975f5c5SAndroid Build Coastguard Worker## dEQP test expectations
40*8975f5c5SAndroid Build Coastguard Worker
41*8975f5c5SAndroid Build Coastguard WorkerThere are a set of [dEQP](dEQP.md) expectations files in the
42*8975f5c5SAndroid Build Coastguard Worker[src/tests/deqp_support](../src/tests/deqp_support) directory.  Notice the format of a line and
43*8975f5c5SAndroid Build Coastguard Workeryour choices for OS, driver, etc.  This is described in the directory's
44*8975f5c5SAndroid Build Coastguard Worker[README.md](../src/tests/deqp_support/README.md) file.  This includes:
45*8975f5c5SAndroid Build Coastguard Worker- `FLAKY` - For rare flakes
46*8975f5c5SAndroid Build Coastguard Worker- `FAIL` - For a test that flakes often or persistently fails
47*8975f5c5SAndroid Build Coastguard Worker- `SKIP` - For a test that crashes
48*8975f5c5SAndroid Build Coastguard Worker- `TIMEOUT` - For a test that is very slow and may timeout
49*8975f5c5SAndroid Build Coastguard Worker
50*8975f5c5SAndroid Build Coastguard Worker
51*8975f5c5SAndroid Build Coastguard Worker## angle_end2end_tests expectations
52*8975f5c5SAndroid Build Coastguard Worker
53*8975f5c5SAndroid Build Coastguard WorkerThese expectations all live in the
54*8975f5c5SAndroid Build Coastguard Worker[angle_end2end_tests_expectations.txt](../src/tests/angle_end2end_tests_expectations.txt) file.  The file format
55*8975f5c5SAndroid Build Coastguard Workeris the same as for the dEQP expectations.  However, `FAIL` and `FLAKY` are not valid, and so the choices are:
56*8975f5c5SAndroid Build Coastguard Worker- `SKIP` - For a test that fails or crashes
57*8975f5c5SAndroid Build Coastguard Worker- `TIMEOUT` - For a test that is very slow and may timeout
58*8975f5c5SAndroid Build Coastguard Worker
59*8975f5c5SAndroid Build Coastguard Worker
60*8975f5c5SAndroid Build Coastguard Worker## Rubber stamping expectations CLs
61*8975f5c5SAndroid Build Coastguard Worker
62*8975f5c5SAndroid Build Coastguard WorkerCLs that only change dEQP or angle_end2end_tests expectations don't require a human reviewer and can be
63*8975f5c5SAndroid Build Coastguard Worker[Rubber Stamped](https://chromium.googlesource.com/infra/infra/+/refs/heads/main/go/src/infra/appengine/rubber-stamper/README.md).
64*8975f5c5SAndroid Build Coastguard WorkerThe procedure is:
65*8975f5c5SAndroid Build Coastguard Worker1. Add [email protected] as the reviewer on the expectations CL. Please also CC a human reviewer for TBR.
66*8975f5c5SAndroid Build Coastguard Worker2. After 1 minute, Rubber Stamper should set "Bot-Commit: +1" on the CL.
67*8975f5c5SAndroid Build Coastguard Worker3. Now you should be able to "Commit-Queue: +2" your CL.
68*8975f5c5SAndroid Build Coastguard Worker
69*8975f5c5SAndroid Build Coastguard Worker
70*8975f5c5SAndroid Build Coastguard Worker## WebGL conformance test expectations
71*8975f5c5SAndroid Build Coastguard Worker
72*8975f5c5SAndroid Build Coastguard WorkerThe expectations files are hosted in the `chromium/src` repository under
73*8975f5c5SAndroid Build Coastguard Worker[content/test/gpu/gpu_tests/test_expectations](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/content/test/gpu/gpu_tests/test_expectations/).
74*8975f5c5SAndroid Build Coastguard WorkerNote that this is not included in local ANGLE-only source tree.
75*8975f5c5SAndroid Build Coastguard Worker
76*8975f5c5SAndroid Build Coastguard WorkerThe format of the file, including the different tags, is documented at the top of the file.  This
77*8975f5c5SAndroid Build Coastguard Workerincludes the following results:
78*8975f5c5SAndroid Build Coastguard Worker
79*8975f5c5SAndroid Build Coastguard Worker- `RetryOnFailure` - For a test that rarely flakes
80*8975f5c5SAndroid Build Coastguard Worker- `Failure` - For a test that fails consistently or flakes often
81*8975f5c5SAndroid Build Coastguard Worker- `Skip` - For a test that causes catastrophic failures (e.g. ends an entire test run, causes a bot
82*8975f5c5SAndroid Build Coastguard Worker   to BSoD); `Skip` should be used very sparingly
83*8975f5c5SAndroid Build Coastguard Worker
84*8975f5c5SAndroid Build Coastguard WorkerYou will need to contact an OWNER of the file to +1 your CL.
85*8975f5c5SAndroid Build Coastguard Worker
86*8975f5c5SAndroid Build Coastguard WorkerYou have two options for creating a CL to the expectations files:
87*8975f5c5SAndroid Build Coastguard Worker
88*8975f5c5SAndroid Build Coastguard Worker1. For trivial edits, you can edit the expectations files via
89*8975f5c5SAndroid Build Coastguard Worker   [Chromium Code Search](https://source.chromium.org/chromium/chromium/src/+/main:content/test/gpu/gpu_tests/test_expectations/):
90*8975f5c5SAndroid Build Coastguard Worker    - In the browser, press the `Edit code` button.  This will bring up a new browser window/tab,
91*8975f5c5SAndroid Build Coastguard Worker      in an editor mode.
92*8975f5c5SAndroid Build Coastguard Worker    - Edit the expecations and then press the `Create change` (or `Update change` button if you
93*8975f5c5SAndroid Build Coastguard Worker      need to change your CL later), which will create a CL.
94*8975f5c5SAndroid Build Coastguard Worker2. Otherwise please [check out the code](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/get_the_code.md)
95*8975f5c5SAndroid Build Coastguard Worker   and [upload a CL](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/contributing.md#Creating-a-change)
96*8975f5c5SAndroid Build Coastguard Worker
97*8975f5c5SAndroid Build Coastguard Worker
98*8975f5c5SAndroid Build Coastguard Worker## "internal swarming failure" on one of the test shards
99*8975f5c5SAndroid Build Coastguard Worker
100*8975f5c5SAndroid Build Coastguard WorkerThis might be caused by a bad bot, clicking on link "Bot assigned to task" will show recent tasks which might look bad
101*8975f5c5SAndroid Build Coastguard Worker(for example, lots of BOT_DIED in [crbug.com/1350556](https://crbug.com/1350556)). The best course of action in this case is to
102*8975f5c5SAndroid Build Coastguard Workerstop the bot by clicking the "stop the bot gracefully" button which will result in a task that looks like
103*8975f5c5SAndroid Build Coastguard Worker"Terminate build117-a9", then open a bug in the Infra>Labs component.
104*8975f5c5SAndroid Build Coastguard WorkerGooglers, see also: [go/gpu-pixel-wrangler-how-to#manually-taking-a-machine-out-of-the-swarming-pool](http://go/gpu-pixel-wrangler-how-to#manually-taking-a-machine-out-of-the-swarming-pool)
105*8975f5c5SAndroid Build Coastguard Worker
106*8975f5c5SAndroid Build Coastguard Worker
107*8975f5c5SAndroid Build Coastguard Worker# Requesting access to the Commit Queue and issue tracker
108*8975f5c5SAndroid Build Coastguard Worker
109*8975f5c5SAndroid Build Coastguard WorkerIf you need to request access for a user (or yourself) please ask a project owner to help. Googlers, email
110*8975f5c5SAndroid Build Coastguard Worker[email protected]. External users, find a couple owners in the [OWNERS](../OWNERS) file and send a
111*8975f5c5SAndroid Build Coastguard Workerrequest via email.
112*8975f5c5SAndroid Build Coastguard Worker
113*8975f5c5SAndroid Build Coastguard WorkerIf you are an ANGLE owner and you want to grant a user access:
114*8975f5c5SAndroid Build Coastguard Worker
115*8975f5c5SAndroid Build Coastguard Worker * For the Monorail issue tracker, add users via the ["People" administration console][MonorailPeople].
116*8975f5c5SAndroid Build Coastguard Worker * For the ANGLE Commit Queue (CQ), grant try-job access via the [Chrome Infra Auth administration console][ChromeAdmin].
117*8975f5c5SAndroid Build Coastguard Worker * The admin console also has a separate group for [CQ access][CQAccessAdmin].
118*8975f5c5SAndroid Build Coastguard Worker
119*8975f5c5SAndroid Build Coastguard Worker[MonorailPeople]: https://bugs.chromium.org/p/angleproject/people/list
120*8975f5c5SAndroid Build Coastguard Worker[ChromeAdmin]: https://chrome-infra-auth.appspot.com/auth/groups/project-angle-tryjob-access
121*8975f5c5SAndroid Build Coastguard Worker[CQAccessAdmin]: https://chrome-infra-auth.appspot.com/auth/groups/project-angle-committers
122