| 49 | |
| 50 | |
| 51 | == Common Problems == |
| 52 | |
| 53 | === Running python based test with multiprocess support === |
| 54 | |
| 55 | I'm running my development environment in a schroot with Ubuntu in an |
| 56 | Ubuntu host. |
| 57 | |
| 58 | It hapenned to me the following error when trying to run the tests |
| 59 | |
| 60 | {{{ |
| 61 | $ ./Tools/Scripts/run-webkit-tests --gtk --debug |
| 62 | Using port 'gtk' |
| 63 | Test configuration: <, x86, debug> |
| 64 | Placing test results in /opt/webkit/WebKit.git/WebKitBuild/Debug/layout-test-results |
| 65 | Baseline search path: gtk -> generic |
| 66 | Using Debug build |
| 67 | Pixel tests disabled |
| 68 | Regular timeout: 12000, slow test timeout: 60000 |
| 69 | Command line: /opt/webkit/WebKit.git/WebKitBuild/Debug/Programs/DumpRenderTree - |
| 70 | |
| 71 | Found 31495 tests; running 28693, skipping 2802. |
| 72 | Running 4 DumpRenderTrees in parallel over 727 shards (1 locked). |
| 73 | |
| 74 | Releasing server lock ... |
| 75 | OSError raised: [Errno 38] Function not implemented |
| 76 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 110, in run |
| 77 | unexpected_result_count = manager.run(args) |
| 78 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 411, in run |
| 79 | self._run_tests(self._test_names, result_summary, int(self._options.child_processes)) |
| 80 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 464, in _run_tests |
| 81 | return self._runner.run_tests(test_inputs, self._expectations, result_summary, num_workers, needs_http, needs_websockets, self._retrying) |
| 82 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py", line 141, in run_tests |
| 83 | with message_pool.get(self, self._worker_factory, num_workers, self._port.worker_startup_delay_secs(), self._port.host) as pool: |
| 84 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/common/message_pool.py", line 61, in get |
| 85 | return _MessagePool(caller, worker_factory, num_workers, worker_startup_delay_secs, host) |
| 86 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/common/message_pool.py", line 79, in __init__ |
| 87 | self._messages_to_worker = multiprocessing.Queue() |
| 88 | File "/usr/lib/python2.7/multiprocessing/__init__.py", line 218, in Queue |
| 89 | return Queue(maxsize) |
| 90 | File "/usr/lib/python2.7/multiprocessing/queues.py", line 63, in __init__ |
| 91 | self._rlock = Lock() |
| 92 | File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__ |
| 93 | SemLock.__init__(self, SEMAPHORE, 1, 1) |
| 94 | File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__ |
| 95 | sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue) |
| 96 | Failed to execute Tools/Scripts/new-run-webkit-tests at ./Tools/Scripts/run-webkit-tests line 126. |
| 97 | }}} |
| 98 | |
| 99 | The reason is explained in this post |
| 100 | http://www.boris.co/2012/02/server-ubuntu-11.html |
| 101 | |
| 102 | Python's _multithreading requires /dev/shm to work. In Ubuntu /dev/shm |
| 103 | points to /run/shm by default. Rename (or delete, I doubt it is |
| 104 | necessary anymore) existing /dev/shm. |
| 105 | |
| 106 | Create /dev/shm directory |
| 107 | |
| 108 | {{{ |
| 109 | $ sudo -i (become root) |
| 110 | $ mkdir /dev/shm |
| 111 | }}} |
| 112 | |
| 113 | Add to /etc/fstab mounting of /dev/shm command |
| 114 | |
| 115 | {{{ |
| 116 | tmpfs /dev/shm tmpfs defaults,noexec,nosuid 0 0 |
| 117 | }}} |
| 118 | |
| 119 | Mount all unmounted filesystems from /etc/fstab. |
| 120 | |
| 121 | {{{ |
| 122 | $ mount -a |
| 123 | }}} |
| 124 | |
| 125 | You may need to do this into your schroot too. |
| 126 | |
| 127 | |
| 128 | === Running python based test with multiprocess support === |
| 129 | |
| 130 | In order to run the Gtk+ tests, you will need the python binding for |
| 131 | GObject Introspection |
| 132 | |
| 133 | You will need to install the following Debian package. For other |
| 134 | distributions, you must install the equivalent packages. |
| 135 | |
| 136 | {{{ |
| 137 | sudo apt-get install python-gi |
| 138 | }}} |
| 139 | |
| 140 | Simply run the `run-gtk-tests` script from the Tools/Scripts |
| 141 | directory. `run-gtk-tests` also supports the `--debug` argument to run |
| 142 | the tests with the debug build of WebKitGTK+. |
| 143 | |
| 144 | {{{ |
| 145 | ./Tools/Scripts/run-gtk-tests --verbose [--debug] |
| 146 | }}} |