Version 1 (modified by Andres Gomez, 8 years ago) (diff)

Initial editing

Using a chroot as working environment

Although WebKit working environment and building system is quite self contained, some people like still to work in a chroot so they can move the complete environment from a computer to another or from a distribution to a different one without major problems and keeping their own production environment clean and totally independent from WebKit development.

Working in a chroot, however, brings some drawbacks. Here you can find some tips, common problems and solutions.

Running tests into the chroot

WebKitGtkLayoutTests explains how to run WebKit tests.

Running python based test with multiprocess support

I'm running my development environment in a schroot with Ubuntu in an Ubuntu host.

It hapenned to me the following error when trying to run the tests

$ ./Tools/Scripts/run-webkit-tests --gtk --debug
Using port 'gtk'
Test configuration: <, x86, debug>
Placing test results in /opt/webkit/WebKit.git/WebKitBuild/Debug/layout-test-results
Baseline search path: gtk -> generic
Using Debug build
Pixel tests disabled
Regular timeout: 12000, slow test timeout: 60000
Command line: /opt/webkit/WebKit.git/WebKitBuild/Debug/Programs/DumpRenderTree -

Found 31495 tests; running 28693, skipping 2802.
Running 4 DumpRenderTrees in parallel over 727 shards (1 locked).

Releasing server lock ...
OSError raised: [Errno 38] Function not implemented
    File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/", line 110, in run
      unexpected_result_count =
    File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/", line 411, in run
      self._run_tests(self._test_names, result_summary, int(self._options.child_processes))
    File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/", line 464, in _run_tests
      return self._runner.run_tests(test_inputs, self._expectations, result_summary, num_workers, needs_http, needs_websockets, self._retrying)
    File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/", line 141, in run_tests
      with message_pool.get(self, self._worker_factory, num_workers, self._port.worker_startup_delay_secs(), as pool:
    File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/common/", line 61, in get
      return _MessagePool(caller, worker_factory, num_workers, worker_startup_delay_secs, host)
    File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/common/", line 79, in __init__
      self._messages_to_worker = multiprocessing.Queue()
    File "/usr/lib/python2.7/multiprocessing/", line 218, in Queue
      return Queue(maxsize)
    File "/usr/lib/python2.7/multiprocessing/", line 63, in __init__
      self._rlock = Lock()
    File "/usr/lib/python2.7/multiprocessing/", line 147, in __init__
      SemLock.__init__(self, SEMAPHORE, 1, 1)
    File "/usr/lib/python2.7/multiprocessing/", line 75, in __init__
      sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
Failed to execute Tools/Scripts/new-run-webkit-tests at ./Tools/Scripts/run-webkit-tests line 126.

The reason is explained in this post

Python's multithreading requires /dev/shm to work. In Ubuntu /dev/shm points to /run/shm by default. Rename (or delete, I doubt it is necessary anymore) existing /dev/shm.

Create /dev/shm directory

$ sudo -i (become root)
$ mkdir /dev/shm

Add to /etc/fstab mounting of /dev/shm command

tmpfs /dev/shm    tmpfs   defaults,noexec,nosuid     0     0

Mount all unmounted filesystems from /etc/fstab.

$ mount -a

You may need to do this into your schroot too.

Pulse Audio