<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dbates&#64;webkit.org" title="Daniel Bates &lt;dbates&#64;webkit.org&gt;"> <span class="fn">Daniel Bates</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - run-webkit-tests should trigger a spindump when WebContent process is unresponsive"
   href="https://bugs.webkit.org/show_bug.cgi?id=159827">bug 159827</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #285370 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - run-webkit-tests should trigger a spindump when WebContent process is unresponsive"
   href="https://bugs.webkit.org/show_bug.cgi?id=159827#c56">Comment # 56</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - run-webkit-tests should trigger a spindump when WebContent process is unresponsive"
   href="https://bugs.webkit.org/show_bug.cgi?id=159827">bug 159827</a>
              from <span class="vcard"><a class="email" href="mailto:dbates&#64;webkit.org" title="Daniel Bates &lt;dbates&#64;webkit.org&gt;"> <span class="fn">Daniel Bates</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=285370&amp;action=diff" name="attach_285370" title="Patch">attachment 285370</a> <a href="attachment.cgi?id=285370&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=285370&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=285370&amp;action=review</a>

We should add tests to ensure that we only call sample() if spindump returns a non-zero exit status. We should use the test test_sample_process_throws_exception as an example for how to substitute a custom function for Executive.run_command().

<span class="quote">&gt; Tools/Scripts/webkitpy/port/mac_unittest.py:-224
&gt; -    def test_sample_process_throws_exception(self):
&gt; -
&gt; -        def throwing_run_command(args):
&gt; -            raise ScriptError(&quot;MOCK script error&quot;)
&gt; -
&gt; -        port = self.make_port()
&gt; -        port._executive = MockExecutive2(run_command_fn=throwing_run_command)
&gt; -        OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42])
&gt; -</span >

We shouldn't remove this test. We should make this test work with the proposed code changes.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>