<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>263260</bug_id>
          
          <creation_ts>2023-10-17 10:49:54 -0700</creation_ts>
          <short_desc>Move testharness.js tests to using a timeout_multiplier</short_desc>
          <delta_ts>2023-10-17 10:50:02 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=248694</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=263252</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sam Sneddon [:gsnedders]">gsnedders</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1985606</commentid>
    <comment_count>0</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2023-10-17 10:49:54 -0700</bug_when>
    <thetext>Currently we set the internal testharness.js timeout in our testharnessreport.js, totally overriding testharness.js&apos;s default behaviours:

  setTimeout(timeout, testRunner.timeout * 0.9);

For Apple ports (though see also bug 263252), this gives for non-slow tests in most configurations a 27s timeout, and for slow tests in most configurations a 135s timeout.

Upstream wptrunner uses a 10s timeout for most tests, or a 60s timeout for &quot;long&quot; (i.e., slow) tests. That said, this is configurable in a bunch of ways; debug Firefox for example uses a 3x multiplier and therefore ends up with 30s/180s timeouts. (Within WebKit, the glib port uses double the timeout for debug, which would mean 20s/120s timeouts, still both shorter than what we currently use.)

In general, we should probably also be setting timeout_multiplier rather than overriding the timeout directly: this allows tests to use test.step_timeout() which scales its timeout based on the multiplier, which hopefully saves us some flakiness.

There&apos;s two main approaches we could go with here:

One is to set it based on the current TestRunner timeout and the default WPT timeout (something like testRunner.timeout * 0.9 / wptTimeout would maintain our current behaviour, but would always result in &gt;1.0 multipliers, which is probably not necessary so we might want a smaller constant than 0.9).

The other is to actually change how we deal with timeouts throughout run-webkit-tests (which probably isn&apos;t a bad idea in general!) to have a base timeout and then just repeatedly increase the multiplier, and pass both into the test runner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1985607</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-10-17 10:50:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/117083423&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>