<?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>158476</bug_id>
          
          <creation_ts>2016-06-07 05:06:39 -0700</creation_ts>
          <short_desc>[GTK] Use a longer timeout for glib unit tests</short_desc>
          <delta_ts>2016-06-07 23:48:18 -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 Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>lforschler</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1200008</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-06-07 05:06:39 -0700</bug_when>
    <thetext>The timeout is supposed to be per test case, but in the case of GLib tests it affects all the tests cases of the same test program. Some test programs like TestLoaderClient, that have a lot of test cases, often time out in the bots because the timeout is not enough to run all the tests cases. So, we should use a longer timeout for GLib tests (for example, timeout * 2).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1200009</commentid>
    <comment_count>1</comment_count>
      <attachid>280695</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-06-07 05:08:34 -0700</bug_when>
    <thetext>Created attachment 280695
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1200027</commentid>
    <comment_count>2</comment_count>
      <attachid>280695</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-06-07 07:08:11 -0700</bug_when>
    <thetext>Comment on attachment 280695
Patch

I don&apos;t like this hack; we should instead mark affected tests as SLOW.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1200127</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-06-07 10:55:12 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 280695 [details]
&gt; Patch
&gt; 
&gt; I don&apos;t like this hack; we should instead mark affected tests as SLOW.

This is not a hack, we are using the same timeout value to measure different things. At the beginning, all google tests were run like GLib tests, the binary was run with all the tests, but we changed that and we run the same binary with the a filter for every test case. That&apos;s possible with google tests because there&apos;s a way to get a list of test cases-. That&apos;s not possible for GLib tests, and now we have the same timeout value that is supposed to be a test case timeout used for tests cases in case of google and test suites in case of GLib. It&apos;s not that TestLoaderClient is slow, and not that we are using a higher value for slow tests, it&apos;s just that it runs a lot of test cases. The timout for a single tests case is usually enough to run all TestLoaderClient tests cases, but not always, which means that in the bots it sometimes times out, and it sometimes passes. So it makes sense to use to use a higher timeout for GLib tests and 20 instead of 10 should be enough and still short enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1200136</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-06-07 11:34:09 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; That&apos;s not
&gt; possible for GLib tests

Can&apos;t we use &apos;gtester -p&apos;?

&gt;, and now we have the same timeout value that is
&gt; supposed to be a test case timeout used for tests cases in case of google
&gt; and test suites in case of GLib. It&apos;s not that TestLoaderClient is slow, and
&gt; not that we are using a higher value for slow tests, it&apos;s just that it runs
&gt; a lot of test cases. The timout for a single tests case is usually enough to
&gt; run all TestLoaderClient tests cases, but not always, which means that in
&gt; the bots it sometimes times out, and it sometimes passes. So it makes sense
&gt; to use to use a higher timeout for GLib tests and 20 instead of 10 should be
&gt; enough and still short enough.

Yes, I understand, but I don&apos;t think a hardcoded, arbitrary 2 is a good way to handle this. We&apos;re going to have to find that in a couple years once a test program requires even longer to run. Marking the affected tests as SLOW seems cleaner to me. Anyway, I didn&apos;t give r- so you can push ahead if you still disagree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1200356</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-06-07 23:41:50 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; That&apos;s not
&gt; &gt; possible for GLib tests
&gt; 
&gt; Can&apos;t we use &apos;gtester -p&apos;?

You can run tests cases independently with -p, but as I said you can&apos;t get the list of tests cases to run, so the test script would need to know in advance the name of all tests cases for all test suites.

&gt; &gt;, and now we have the same timeout value that is
&gt; &gt; supposed to be a test case timeout used for tests cases in case of google
&gt; &gt; and test suites in case of GLib. It&apos;s not that TestLoaderClient is slow, and
&gt; &gt; not that we are using a higher value for slow tests, it&apos;s just that it runs
&gt; &gt; a lot of test cases. The timout for a single tests case is usually enough to
&gt; &gt; run all TestLoaderClient tests cases, but not always, which means that in
&gt; &gt; the bots it sometimes times out, and it sometimes passes. So it makes sense
&gt; &gt; to use to use a higher timeout for GLib tests and 20 instead of 10 should be
&gt; &gt; enough and still short enough.
&gt; 
&gt; Yes, I understand, but I don&apos;t think a hardcoded, arbitrary 2 is a good way
&gt; to handle this. We&apos;re going to have to find that in a couple years once a
&gt; test program requires even longer to run. Marking the affected tests as SLOW
&gt; seems cleaner to me. Anyway, I didn&apos;t give r- so you can push ahead if you
&gt; still disagree.

All timeout values we use are arbitrary, so the 10 seconds timeout we use for every specific test case is as arbitrary as using 20 for tests suites. If we mark TestLoaderClient as a slow now (which is not slow at all), we will have the same problem eventually if we add more tests cases to other tests, so using a different timeout for test suites than for tests cases also prevents this from happening. So, yes, I still disagree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1200359</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-06-07 23:48:18 -0700</bug_when>
    <thetext>Committed r201795: &lt;http://trac.webkit.org/changeset/201795&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>280695</attachid>
            <date>2016-06-07 05:08:34 -0700</date>
            <delta_ts>2016-06-07 08:58:43 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>wk-glib-test-timeout.diff</filename>
            <type>text/plain</type>
            <size>2030</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBiL1Rvb2xzL0NoYW5nZUxvZwppbmRleCBjNmUy
MGFjLi4yNGY4NzU1IDEwMDY0NAotLS0gYS9Ub29scy9DaGFuZ2VMb2cKKysrIGIvVG9vbHMvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTggQEAKKzIwMTYtMDYtMDcgIENhcmxvcyBHYXJjaWEgQ2FtcG9z
ICA8Y2dhcmNpYUBpZ2FsaWEuY29tPgorCisgICAgICAgIFtHVEtdIFVzZSBhIGxvbmdlciB0aW1l
b3V0IGZvciBnbGliIHVuaXQgdGVzdHMKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcv
c2hvd19idWcuY2dpP2lkPTE1ODQ3NgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09Q
UyEpLgorCisgICAgICAgIFRoZSB0aW1lb3V0IGlzIHN1cHBvc2VkIHRvIGJlIHBlciB0ZXN0IGNh
c2UsIGJ1dCBpbiB0aGUgY2FzZ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uU0xPVzoKICAgICAgICAgICAgIHRpbWVvdXQgKj0gNQo=
</data>
<flag name="review"
          id="304598"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>