<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Layout tests abort with PulseAudioSanitizer instance has no attribute '_pa_module_index' when the build is not ready."
   href="https://bugs.webkit.org/show_bug.cgi?id=153216">153216</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Layout tests abort with PulseAudioSanitizer instance has no attribute '_pa_module_index' when the build is not ready.
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>clopez&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lforschler&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When the build is not ready, trying to run run-webkit-tests will cause this:

$ Tools/Scripts/run-webkit-tests --release --gtk 
Using port 'gtk-wk2'
Test configuration: &lt;, x86, release&gt;
Placing test results in /home/slave/testbuild/WebKit/WebKitBuild/Release/layout-test-results
Baseline search path: gtk -&gt; wk2 -&gt; generic
Using Release build
Pixel tests disabled
Regular timeout: 6000, slow test timeout: 30000
Command line: /home/slave/testbuild/WebKit/Tools/jhbuild/jhbuild-wrapper --gtk run /home/slave/testbuild/WebKit/WebKitBuild/Release/bin/WebKitTestRunner -

Found 43415 tests; running 38964, skipping 4451.
WebKitTestRunner was not found at /home/slave/testbuild/WebKit/WebKitBuild/Release/bin/WebKitTestRunner
Build check failed

AttributeError raised: PulseAudioSanitizer instance has no attribute '_pa_module_index'
Traceback (most recent call last):
  File &quot;/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py&quot;, line 77, in main
    run_details = run(port, options, args, stderr)
  File &quot;/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py&quot;, line 409, in run
    run_details = manager.run(args)
  File &quot;/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py&quot;, line 229, in run
    self._clean_up_run()
  File &quot;/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py&quot;, line 279, in _clean_up_run
    self._port.clean_up_test_run()
  File &quot;/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/port/gtk.py&quot;, line 110, in clean_up_test_run
    self._pulseaudio_sanitizer.restore_pulseaudio_module()
  File &quot;/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py&quot;, line 81, in restore_pulseaudio_module
    if self._pa_module_index != -1:
AttributeError: PulseAudioSanitizer instance has no attribute '_pa_module_index'


The variable PulseAudioSanitizer._pa_module_index is set when PulseAudioSanitizer.unload_pulseaudio_module() is called from Port.setup_test_run(), which is done before calling  PulseAudioSanitizer.restore_pulseaudio_module() which checks for this variable to be != -1

The issue is that when the build is not ready, Port.setup_test_run() is not run therefore the variable PulseAudioSanitizer.restore_pulseaudio_module() is not set causing this.</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>