Bug 153216 - [GTK][EFL] Layout tests abort with PulseAudioSanitizer instance has no attribute '_pa_module_index' when the build is not ready.
Summary: [GTK][EFL] Layout tests abort with PulseAudioSanitizer instance has no attrib...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
Depends on:
Reported: 2016-01-18 18:17 PST by Carlos Alberto Lopez Perez
Modified: 2016-01-18 20:05 PST (History)
6 users (show)

See Also:

Patch (1.50 KB, patch)
2016-01-18 18:21 PST, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2016-01-18 18:17:35 PST
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: <, x86, release>
Placing test results in /home/slave/testbuild/WebKit/WebKitBuild/Release/layout-test-results
Baseline search path: gtk -> wk2 -> 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 "/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 77, in main
    run_details = run(port, options, args, stderr)
  File "/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 409, in run
    run_details = manager.run(args)
  File "/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 229, in run
  File "/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 279, in _clean_up_run
  File "/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/port/gtk.py", line 110, in clean_up_test_run
  File "/home/slave/testbuild/WebKit/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py", 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.
Comment 1 Carlos Alberto Lopez Perez 2016-01-18 18:21:56 PST
Created attachment 269251 [details]
Comment 2 WebKit Commit Bot 2016-01-18 20:05:34 PST
Comment on attachment 269251 [details]

Clearing flags on attachment: 269251

Committed r195245: <http://trac.webkit.org/changeset/195245>
Comment 3 WebKit Commit Bot 2016-01-18 20:05:38 PST
All reviewed patches have been landed.  Closing bug.