New issue
Advanced search Search tips

Issue 807627 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 699244
issue 805463



Sign in to add a comment

[WPT] jsharness tests being mistakenly interpreted as reftests

Project Member Reported by smcgruer@chromium.org, Jan 31 2018

Issue description

There appears to be some sort of flake in the test harness or test infrastructure, such that jsharness tests are occasionally producing no output and are being interpreted as reftests (which then fail due to lack of ref file).

This recently struck https://chromium-review.googlesource.com/c/chromium/src/+/882002, which converted a number of reftests to jsharness tests, and which was reverted very soon after being submitted due to failures on a single bot:

https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Linux%20Trusty/39500

11:18:45.457 13059 reference /b/s/w/ir/third_party/WebKit/LayoutTests/external/wpt/css/css-position/position-sticky-root-scroller-ref.html was not found
11:18:45.458 12904 [5061/10633] external/wpt/css/css-position/position-sticky-root-scroller.html failed unexpectedly (reference test didn't generate pixel results)
11:18:45.455 13066 worker/5 external/wpt/css/css-flexbox/flex-shrink-004.html passed
11:18:45.457 13059 worker/0 external/wpt/css/css-position/position-sticky-root-scroller.html failed:

Running this test (or even the whole sticky suite) locally 1000 times on a Linux Debug build did not produce any flake.

See also issue 805463, where this problem ended up with an acid3 test being disabled.
 
Relevant comment from the original thread:

robertma@:
"More background: the most inner runner (single_test_runner) doesn't actually read manifest at all. Instead, it determines if a test uses testharness.js based on its output... Namely, it looks for the "This is a testharness.js-based test." header, which is added by our testharnessreport.js automatically.

Therefore, if a test produces empty output (or content_shell considers prematurely the test has finished), the runner would interpret the test as a reftest.

I still struggle to understand why this is even possible. Our testharnessreport.js calls `testRunner.waitUntilDone()` immediately when loaded, so it'd be a timeout if a test doesn't finish properly. And when a tests finishes, testharness.js calls the completionCallback in testharnessreport.js, which will print the header before calling `testRunner.notifyDone()`, so it's weird that the header isn't found.

testharnessreport.js: https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/resources/testharnessreport.js

Note: for WPT, we use the upstream testharness.js at https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/resources/testharness.js, *NOT* the copy in LayoutTests/resources."


Blocking: 805463
Components: Blink>Infra>Ecosystem
Status: Assigned (was: Untriaged)

Comment 3 by foolip@chromium.org, Feb 22 2018

In the case of https://chromium-review.googlesource.com/c/chromium/src/+/882002, I would suspect any weirdness of being the same as what I fixed in https://github.com/w3c/web-platform-tests/pull/9598.

Since we do update incrementally from WPT_BASE_MANIFEST.json, it seems very likely that it would have happened immediately after this was landed.

If some tests are being *randomly* interpreted as of the wrong type, that might be a different problem though.

That changes in https://github.com/w3c/web-platform-tests/pull/9598 need to be imported, and I don't recall what the procedure is. Maybe we should make it part of the rotation and semi-automated :)
Based on the log for third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/manifest/manifest.py, it hasnt been updated since Sept 25 2017:

commit 26a8ae1db8e8caa1f7c8b84611d6c72948120320
Author: Robert Ma <robertma@chromium.org>
Date:   Mon Sep 25 15:31:56 2017 +0000

    Roll in new version of wpt tools and modify callers correspondingly
    
    * Updated the versions in WPT_HEAD in checkout.sh and README.chromium.
    * All wpt commands now have a single entry point, wpt. Include this
      dispatch module in WPTWhiteList.
    * The commands for generating manifest, starting wptserve and running
      wpt lint are now "wpt manifest", "wpt serve" and "wpt lint". Change
      webkitpy and PRESUBMIT.py accordingly.
    * The new wptserve contains a change for
      fetch/api/abort/general-serviceworker.https.html
      (https://github.com/w3c/web-platform-tests/pull/6484),
      so the test is rebaselined.
    
    Bug:  749879 
    Change-Id: I214860078add1c391266f063193aa279db414bb0
    Reviewed-on: https://chromium-review.googlesource.com/677557
    Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
    Commit-Queue: Robert Ma <robertma@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#504060}


Not sure if it was automated at all or just manual?

Comment 5 by foolip@chromium.org, Feb 26 2018

It's updated manually.
I don't think the manifest is used by the test runner to determine reftests vs. jsharness tests, but I could be wrong. I'll have to double check.

Meanwhile, let me do another roll of the wpt tools in case that solves the problem. (And it's been long enough since the last roll so we should update them anyway.)

I'm thinking about one potential fix: modifying the test runner to rely on the manifest instead of the test output to determine the type of a test in WPT. (Unfortunately, we still need to keep the original output-based checks for non-WPT layout tests.)
Blocking: 699244
Although Stephen's CL (https://crrev.com/c/951662) seems to stick this time, acid/acid3/numbered-tests.html (issue 805463) is still flaky and the reland was reverted by sheriffs.

I suspect the bug in delta updating manifest is not the root cause (or is only part of the story). Still need to investigate further.
robertma@chromium.org ping from your friendly neighbourhood Ecosystem Infra rotation :-)
robertma@chromium.org ping from your friendly neighbourhood Ecosystem Infra rotation. Does this bug disappear into the ether when other people are on rotation?
The act of pinging bumps the modified date of the bug so that it disappears for another 60 days.
Rotation ping :)

Sign in to add a comment