<?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>203652</bug_id>
          
          <creation_ts>2019-10-30 18:23:30 -0700</creation_ts>
          <short_desc>Flaky API Test TestWebKitAPI.WebKit.UploadDirectory</short_desc>
          <delta_ts>2019-11-04 09:50:44 -0800</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>Other</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aakash Jain">aakash_jain</reporter>
          <assigned_to name="Alex Christensen">achristensen</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1585702</commentid>
    <comment_count>0</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2019-10-30 18:23:30 -0700</bug_when>
    <thetext>TestWebKitAPI.WebKit.UploadDirectory seems flaky on macOS. In https://ews-build.webkit.org/#/builders/3/builds/11242, the test failed in run-api-tests step. However, in the immediately next retry step (re-run-api-tests), it passed.

Similar thing happened in: https://ews-build.webkit.org/#/builders/3/builds/11243</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1585805</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-10-30 23:37:58 -0700</bug_when>
    <thetext>This test started to crash in r251778, then it turned into a failure with r251795, and then it stopped failing without a clear reason a few commits later.

I suspect that this is a bad test that can leak state when it crashes.

Either way, this is not happening any more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1585861</commentid>
    <comment_count>2</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2019-10-31 05:41:23 -0700</bug_when>
    <thetext>Still flaky. Failed just now in https://ews-build.webkit.org/#/builders/3/builds/11251/steps/13/logs/json</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586021</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-10-31 12:54:49 -0700</bug_when>
    <thetext>Build 11251 had 788 API test failures with the patch, and then just this one with the patch removed.

I think that this is a bad test that leaves state sometimes, which makes it fail the next time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586023</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-10-31 12:56:01 -0700</bug_when>
    <thetext>&lt;rdar://problem/56791786&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586937</commentid>
    <comment_count>5</comment_count>
      <attachid>382732</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2019-11-04 03:55:16 -0800</bug_when>
    <thetext>Created attachment 382732
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586988</commentid>
    <comment_count>6</comment_count>
      <attachid>382732</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-11-04 08:01:50 -0800</bug_when>
    <thetext>Comment on attachment 382732
Patch

Can&apos;t we remove the directory at the beginning of the test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586990</commentid>
    <comment_count>7</comment_count>
      <attachid>382741</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2019-11-04 08:13:33 -0800</bug_when>
    <thetext>Created attachment 382741
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586992</commentid>
    <comment_count>8</comment_count>
      <attachid>382741</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-11-04 08:18:17 -0800</bug_when>
    <thetext>Comment on attachment 382741
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=382741&amp;action=review

&gt; Tools/TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm:75
&gt; +    [fileManager removeItemAtPath:directory.path error:nil];

Then why not keep the assertion?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587005</commentid>
    <comment_count>9</comment_count>
      <attachid>382741</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2019-11-04 08:35:54 -0800</bug_when>
    <thetext>Comment on attachment 382741
Patch

The point was that after a previous iteration of this test crashes, it leaves behind a file.  removeItemAtPath:error: returns different values depending on whether the file existed before or not, so keeping the assertion would be propagating the flakiness.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587009</commentid>
    <comment_count>10</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-11-04 08:44:01 -0800</bug_when>
    <thetext>(In reply to Alex Christensen from comment #9)
&gt; Comment on attachment 382741 [details]
&gt; Patch
&gt; 
&gt; The point was that after a previous iteration of this test crashes, it
&gt; leaves behind a file.  removeItemAtPath:error: returns different values
&gt; depending on whether the file existed before or not, so keeping the
&gt; assertion would be propagating the flakiness.

I don&apos;t understand why asserting that the folder is not there after removing it would cause flakiness? Do you expect folder removal to fail for some reason?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587011</commentid>
    <comment_count>11</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2019-11-04 08:49:53 -0800</bug_when>
    <thetext>Oh, asserting that the folder is not there after removing it would be fine but I think it would be redundant.  I was talking about asserting that removing it succeeded or that the folder is not there before removing, both of which would be flaky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587016</commentid>
    <comment_count>12</comment_count>
      <attachid>382741</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-11-04 09:06:19 -0800</bug_when>
    <thetext>Comment on attachment 382741
Patch

I would slightly prefer checking for the error or asserting after deleting. Knowing that deletion succeeded will make it easier to reason about future failures, if any occur.

r=me with or without such changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587017</commentid>
    <comment_count>13</comment_count>
      <attachid>382741</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2019-11-04 09:07:26 -0800</bug_when>
    <thetext>Comment on attachment 382741
Patch

Committing as-is.  If we see future flakiness we can add such assertions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587030</commentid>
    <comment_count>14</comment_count>
      <attachid>382741</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-11-04 09:50:42 -0800</bug_when>
    <thetext>Comment on attachment 382741
Patch

Clearing flags on attachment: 382741

Committed r251996: &lt;https://trac.webkit.org/changeset/251996&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587031</commentid>
    <comment_count>15</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-11-04 09:50:44 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>382732</attachid>
            <date>2019-11-04 03:55:16 -0800</date>
            <delta_ts>2019-11-04 08:09:40 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-203652-20191104115515.patch</filename>
            <type>text/plain</type>
            <size>1771</size>
            <attacher name="Alex Christensen">achristensen</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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cl0pOwogICAgIEVYUEVDVF9GQUxTRShlcnJvcik7CiAgICAgTlNEYXRhICp0ZXN0
RGF0YSA9IFtAInRlc3RkYXRhIiBkYXRhVXNpbmdFbmNvZGluZzpOU1VURjhTdHJpbmdFbmNvZGlu
Z107Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>382741</attachid>
            <date>2019-11-04 08:13:33 -0800</date>
            <delta_ts>2019-11-04 09:50:42 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-203652-20191104161332.patch</filename>
            <type>text/plain</type>
            <size>1833</size>
            <attacher name="Alex Christensen">achristensen</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI1MTk4OSkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE3IEBACisyMDE5LTExLTA0ICBBbGV4IENocmlzdGVuc2VuICA8YWNocmlzdGVuc2VuQHdl
YmtpdC5vcmc+CisKKyAgICAgICAgRmxha3kgQVBJIFRlc3QgVGVzdFdlYktpdEFQSS5XZWJLaXQu
VXBsb2FkRGlyZWN0b3J5CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVn
LmNnaT9pZD0yMDM2NTIKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKwor
ICAgICAgICBJdCBpcyBub3QgaW1wb3J0YW50IHRoYXQgdGhlIGRpcmVjdG9yeSB0byB1cGxvYWQg
ZG9lcyBub3QgZXhpc3QgYmVmb3JlIHRoZSB0ZXN0IHN0YXJ0cy4KKyAgICAgICAgTWFrZSB0aGUg
dGVzdCBtb3JlIHJvYnVzdCB0byBzdGF0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