Bug 1521879 - Part 7: Create new CI jobs for media mochitests with socket process enabled. r=ahal
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 25 Feb 2019 21:52:13 +0000
changeset 518887 634949dfc7926a1c295b08fdd015ca13b57d3113
parent 518886 259d00c5c42b830a5983ee65acfa9cc9c04fe6c5
child 518888 083dee3d21698b298e1a77cb09f974bdedca1b84
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1521879
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1521879 - Part 7: Create new CI jobs for media mochitests with socket process enabled. r=ahal Differential Revision: https://phabricator.services.mozilla.com/D17942
dom/media/tests/mochitest/mochitest.ini
taskcluster/ci/config.yml
taskcluster/ci/test/mochitest.yml
taskcluster/docs/attributes.rst
taskcluster/taskgraph/transforms/tests.py
testing/mochitest/runtests.py
--- a/dom/media/tests/mochitest/mochitest.ini
+++ b/dom/media/tests/mochitest/mochitest.ini
@@ -121,23 +121,23 @@ skip-if = (android_version == '18') # an
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_audioSynchronizationSourcesUnidirectional.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_audioContributingSources.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_checkPacketDumpHook.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_basicAudioNATSrflx.html]
-skip-if = toolkit == 'android' || (verify && (os == 'linux')) # websockets don't work on android (bug 1266217)
+skip-if = toolkit == 'android' || (verify && (os == 'linux')) || socketprocess_e10s # websockets don't work on android (bug 1266217, IPV6 is busted in try which causes timeouts in socket process case (bug 1521117))
 [test_peerConnection_basicAudioNATRelay.html]
-skip-if = toolkit == 'android' || (verify && debug && (os == 'linux')) # websockets don't work on android (bug 1266217)
+skip-if = toolkit == 'android' || (verify && debug && (os == 'linux')) || socketprocess_e10s # websockets don't work on android (bug 1266217, IPV6 is busted in try which causes timeouts in socket process case (bug 1521117))
 [test_peerConnection_basicAudioNATRelayTCP.html]
-skip-if = toolkit == 'android' # websockets don't work on android (bug 1266217)
+skip-if = toolkit == 'android' || socketprocess_e10s # websockets don't work on android (bug 1266217, IPV6 is busted in try which causes timeouts in socket process case (bug 1521117))
 [test_peerConnection_basicAudioNATRelayTLS.html]
-skip-if = true # need pyopenssl on builders, see bug 1323439 # toolkit == 'android' # websockets don't work on android (bug 1266217)
+skip-if = true # need pyopenssl on builders, see bug 1323439 # toolkit == 'android' || socketprocess_e10s # websockets don't work on android (bug 1266217), IPV6 is busted in try which causes timeouts in socket process case (bug 1521117)
 [test_peerConnection_basicAudioRequireEOC.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_basicAudioPcmaPcmuOnly.html]
 skip-if = android_version == '18'
 [test_peerConnection_basicAudioDynamicPtMissingRtpmap.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_basicAudioVerifyRtpHeaderExtensions.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
@@ -342,17 +342,17 @@ skip-if = (android_version == '18') # an
 [test_peerConnection_threeUnbundledConnections.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_selftest.html]
 # Bug 1227781: Crash with bogus TURN server.
 [test_peerConnection_bug1227781.html]
 [test_peerConnection_stats.html]
 skip-if = toolkit == 'android' # android(Bug 1189784, timeouts on 4.3 emulator, Bug 1373858)
 [test_peerConnection_stats_relayProtocol.html]
-skip-if = toolkit == 'android' # android(Bug 1189784, timeouts on 4.3 emulator, Bug 1373858)
+skip-if = toolkit == 'android' || socketprocess_e10s # android(Bug 1189784, timeouts on 4.3 emulator, Bug 1373858, Bug 1521117)
 [test_peerConnection_sender_and_receiver_stats.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_trackless_sender_stats.html]
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_verifyDescriptions.html]
 skip-if = (android_version == '18')
 [test_fingerprinting_resistance.html]
 [test_getUserMedia_nonDefaultRate.html]
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -13,17 +13,19 @@ treeherder:
         'Bpgo': 'Profile-guided optimization builds'
         'Fetch-URL': 'Fetch and store content'
         'Fxfn-l': 'Firefox functional tests (local)'
         'Fxfn-l-e10s': 'Firefox functional tests (local) with e10s'
         'Fxfn-r': 'Firefox functional tests (remote)'
         'Fxfn-r-e10s': 'Firefox functional tests (remote) with e10s'
         'M': 'Mochitests'
         'M-sw': 'Mochitests with serviceworker redesign'
+        'M-spi': 'Mochitests with socket process'
         'M-e10s': 'Mochitests with e10s'
+        'M-e10s-spi': 'Mochitests with socket process and e10s'
         'M-sw-e10s': 'Mochitests with serviceworker redesign and e10s'
         'M-V': 'Mochitests on Valgrind'
         'MSI': 'Repack installers into MSIs'
         'MSIs': 'Signing of Repacked installers of MSIs'
         'R': 'Reftests'
         'R-sw': 'Reftests with serviceworker redesign enabled'
         'R-e10s': 'Reftests with e10s'
         'R-sw-e10s': 'Reftests with serviceworker redesign and e10s'
--- a/taskcluster/ci/test/mochitest.yml
+++ b/taskcluster/ci/test/mochitest.yml
@@ -2,16 +2,17 @@ job-defaults:
     target:
         by-test-platform:
             android-em-7.*: geckoview-androidTest.apk
             default: null
     serviceworker-e10s:
         by-test-platform:
             linux64/debug: both
             default: false
+    socketprocess-e10s: false
     mozharness:
         script:
             by-test-platform:
                 android-em.*: android_emulator_unittest.py
                 android-hw.*: android_hardware_unittest.py
                 default: desktop_unittest.py
         config:
             by-test-platform:
@@ -278,16 +279,20 @@ mochitest-media:
     suite: mochitest/mochitest-media
     treeherder-symbol: M(mda)
     max-run-time:
         by-test-platform:
             windows10-64-ccov/debug: 7200
             macosx64-ccov/debug: 7200
             default: 5400
     run-on-projects: built-projects
+    socketprocess-e10s:
+        by-test-platform:
+            android.*: false
+            default: both
     loopback-video: true
     virtualization:
         by-test-platform:
             windows10-64(?:-pgo)?-qr/.*: virtual-with-gpu
             default: virtual
     instance-size:
         by-test-platform:
             android-em.*: xlarge
--- a/taskcluster/docs/attributes.rst
+++ b/taskcluster/docs/attributes.rst
@@ -131,16 +131,22 @@ This is the chunk number of a chunked te
 that this is a string!
 
 serviceworker_e10s
 ==================
 
 For test suites which distinguish whether or not they run with the serviceworker
 e10s redesign enabled.
 
+socketprocess_e10s
+==================
+
+For test suites which distinguish whether or not they run with the socket
+process enabled.
+
 e10s
 ====
 
 For test suites which distinguish whether they run with or without e10s, this
 boolean value identifies this particular run.
 
 image_name
 ==========
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -218,16 +218,24 @@ test_description_schema = Schema({
     # Whether to run this task with e10s.  If false, run
     # without e10s; if true, run with e10s; if 'both', run one task with and
     # one task without e10s.  E10s tasks have "-e10s" appended to the test name
     # and treeherder group.
     Required('e10s'): optionally_keyed_by(
         'test-platform', 'project',
         Any(bool, 'both')),
 
+    # Whether to run this task with the socket process enabled (desktop-test
+    # only).  If 'both', run one task with and one task without.  Tasks with
+    # this enabled have have "-spi" appended to the test name and treeherder
+    # group.
+    Optional('socketprocess-e10s'): optionally_keyed_by(
+        'test-platform', 'project',
+        Any(bool, 'both')),
+
     # Whether the task should run with WebRender enabled or not.
     Optional('webrender'): bool,
 
     # The EC2 instance size to run these tests on.
     Required('instance-size'): optionally_keyed_by(
         'test-platform',
         Any('default', 'large', 'xlarge')),
 
@@ -479,16 +487,17 @@ def set_defaults(config, tests):
         test.setdefault('max-run-time', 3600)
         test.setdefault('reboot', False)
         test.setdefault('virtualization', 'virtual')
         test.setdefault('loopback-audio', False)
         test.setdefault('loopback-video', False)
         test.setdefault('docker-image', {'in-tree': 'desktop1604-test'})
         test.setdefault('checkout', False)
         test.setdefault('serviceworker-e10s', False)
+        test.setdefault('socketprocess-e10s', False)
         test.setdefault('require-signed-extensions', False)
 
         test['mozharness'].setdefault('extra-options', [])
         test['mozharness'].setdefault('requires-signed-builds', False)
         test['mozharness'].setdefault('tooltool-downloads', 'public')
         test['mozharness'].setdefault('set-moz-node-path', False)
         test['mozharness'].setdefault('chunked', False)
         test['mozharness'].setdefault('chunking-args', 'this-chunk')
@@ -720,16 +729,17 @@ def handle_keyed_by(config, tests):
     """Resolve fields that can be keyed by platform, etc."""
     fields = [
         'instance-size',
         'docker-image',
         'max-run-time',
         'chunks',
         'serviceworker-e10s',
         'e10s',
+        'socketprocess-e10s',
         'suite',
         'run-on-projects',
         'os-groups',
         'run-as-administrator',
         'mozharness.chunked',
         'mozharness.config',
         'mozharness.extra-options',
         'mozharness.requires-signed-builds',
@@ -849,16 +859,20 @@ def handle_run_on_projects(config, tests
         if test['run-on-projects'] == 'built-projects':
             test['run-on-projects'] = test['build-attributes'].get('run_on_projects', ['all'])
         yield test
 
 
 @transforms.add
 def split_serviceworker_e10s(config, tests):
     for test in tests:
+        if test['attributes'].get('socketprocess_e10s'):
+            yield test
+            continue
+
         sw = test.pop('serviceworker-e10s')
 
         test['serviceworker-e10s'] = False
         test['attributes']['serviceworker_e10s'] = False
 
         if sw == 'both':
             yield copy.deepcopy(test)
             sw = True
@@ -908,16 +922,49 @@ def split_e10s(config, tests):
                     if option.startswith('--suite='):
                         test['mozharness']['extra-options'][i] += '-e10s'
             else:
                 test['mozharness']['extra-options'].append('--e10s')
         yield test
 
 
 @transforms.add
+def split_socketprocess_e10s(config, tests):
+    for test in tests:
+        if test['attributes'].get('serviceworker_e10s'):
+            yield test
+            continue
+
+        sw = test.pop('socketprocess-e10s')
+
+        test['socketprocess-e10s'] = False
+        test['attributes']['socketprocess_e10s'] = False
+
+        if sw == 'both':
+            yield copy.deepcopy(test)
+            sw = True
+        if sw:
+            test['description'] += " with socket process enabled"
+            test['test-name'] += '-spi'
+            test['try-name'] += '-spi'
+            test['attributes']['socketprocess_e10s'] = True
+            group, symbol = split_symbol(test['treeherder-symbol'])
+            if group != '?':
+                group += '-spi'
+            else:
+                symbol += '-spi'
+            test['treeherder-symbol'] = join_symbol(group, symbol)
+            test['mozharness']['extra-options'].append(
+                '--setpref="media.peerconnection.mtransport_process=true"')
+            test['mozharness']['extra-options'].append(
+                '--setpref="network.process.enabled=true"')
+        yield test
+
+
+@transforms.add
 def split_chunks(config, tests):
     """Based on the 'chunks' key, split tests up into chunks by duplicating
     them and assigning 'this-chunk' appropriately and updating the treeherder
     symbol."""
     for test in tests:
         if test['suite'].startswith('test-verify') or \
            test['suite'].startswith('test-coverage'):
             env = config.params.get('try_task_config', {}) or {}
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -2546,16 +2546,18 @@ toolbar#nav-bar {
             options.e10s = False
 
         # for test manifest parsing.
         mozinfo.update({
             "e10s": options.e10s,
             "headless": options.headless,
             "serviceworker_e10s": self.extraPrefs.get(
                 'dom.serviceWorkers.parent_intercept', False),
+            "socketprocess_e10s": self.extraPrefs.get(
+                'network.process.enabled', False),
         })
 
         self.setTestRoot(options)
 
         # Despite our efforts to clean up servers started by this script, in practice
         # we still see infrequent cases where a process is orphaned and interferes
         # with future tests, typically because the old server is keeping the port in use.
         # Try to avoid those failures by checking for and killing servers before
@@ -2772,16 +2774,18 @@ toolbar#nav-bar {
                 self.buildURLOptions(options, self.browserEnv)
                 if self.urlOpts:
                     testURL += "?" + "&".join(self.urlOpts)
 
                 self.log.info("runtests.py | Running with scheme: {}".format(scheme))
                 self.log.info("runtests.py | Running with e10s: {}".format(options.e10s))
                 self.log.info("runtests.py | Running with serviceworker_e10s: {}".format(
                     mozinfo.info.get('serviceworker_e10s', False)))
+                self.log.info("runtests.py | Running with socketprocess_e10s: {}".format(
+                    mozinfo.info.get('socketprocess_e10s', False)))
                 self.log.info("runtests.py | Running tests: start.\n")
                 ret, _ = self.runApp(
                     testURL,
                     self.browserEnv,
                     options.app,
                     profile=self.profile,
                     extraArgs=options.browserArgs,
                     utilityPath=options.utilityPath,