Bug 1475573 - Create --enable-fuzzing debug build job for Android x86 firefox. r=nalexander,froydnj
authorJesse Schwartzentruber <truber@mozilla.com>
Fri, 31 Aug 2018 03:35:20 +0000
changeset 434195 b073a55c2be73fc6e5ba1a0f2bcef7c61d4d68ef
parent 434194 06af1619a7998038ce334196cf6e8790d26007c2
child 434196 d7fcfbc15cfe5e33cce5a12ff009e9b6aec07811
child 434226 bc7c9760b7d1db79ff9eaefbe17b871a6a50ea65
push id68585
push userccoroiu@mozilla.com
push dateFri, 31 Aug 2018 05:23:42 +0000
treeherderautoland@b073a55c2be7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander, froydnj
bugs1475573
milestone63.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 1475573 - Create --enable-fuzzing debug build job for Android x86 firefox. r=nalexander,froydnj Differential Revision: https://phabricator.services.mozilla.com/D2428
js/moz.configure
taskcluster/ci/build/android.yml
testing/mozharness/mozharness/mozilla/building/buildbase.py
tools/fuzzing/faulty/Faulty.cpp
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -426,19 +426,20 @@ with only_when('--enable-compile-environ
                          check_msg='for AFL compiler',
                          when='--enable-fuzzing'))
     def enable_aflfuzzer(afl):
         if afl:
             return True
 
     @depends(enable_fuzzing,
              enable_aflfuzzer,
-             c_compiler)
-    def enable_libfuzzer(fuzzing, afl, c_compiler):
-        if fuzzing and not afl and c_compiler.type == 'clang':
+             c_compiler,
+             target)
+    def enable_libfuzzer(fuzzing, afl, c_compiler, target):
+        if fuzzing and not afl and c_compiler.type == 'clang' and target.os != 'Android':
             return True
 
     @depends(enable_fuzzing,
              enable_aflfuzzer,
              enable_libfuzzer)
     def enable_fuzzing_interfaces(fuzzing, afl, libfuzzer):
         if fuzzing and (afl or libfuzzer):
             return True
--- a/taskcluster/ci/build/android.yml
+++ b/taskcluster/ci/build/android.yml
@@ -165,16 +165,67 @@ android-x86/opt:
         - android-sdk-linux
         - linux64-clang
         - linux64-rust-android
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
+android-x86-fuzzing/debug:
+    description: "Android x86 Fuzzing Debug"
+    index:
+        product: mobile
+        job-name: android-x86-fuzzing-debug
+    treeherder:
+        platform: android-4-2-x86/debug
+        symbol: Bf
+    worker-type: aws-provisioner-v1/gecko-{level}-b-android
+    worker:
+        docker-image: {in-tree: android-build}
+        max-run-time: 7200
+        env:
+            GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
+            TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
+        artifacts:
+            - name: public/android/R
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
+              type: directory
+            - name: public/android/maven
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
+              type: directory
+            - name: public/build/geckoview-androidTest.apk
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/outputs/apk/androidTest/officialWithGeckoBinariesNoMinApi/debug/geckoview-official-withGeckoBinaries-noMinApi-debug-androidTest.apk
+              type: file
+            - name: public/build/geckoview_example.apk
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk
+              type: file
+            - name: public/build
+              path: /builds/worker/artifacts/
+              type: directory
+    run:
+        using: mozharness
+        actions: [get-secrets build multi-l10n update]
+        config:
+            - builds/releng_base_android_64_builds.py
+        script: "mozharness/scripts/fx_desktop_build.py"
+        secrets: true
+        custom-build-variant-cfg: x86-fuzzing-debug
+        tooltool-downloads: internal
+    toolchains:
+        - android-gradle-dependencies
+        - android-ndk-linux
+        - android-sdk-linux
+        - linux64-clang
+        - linux64-rust-android
+        - linux64-rust-size
+        - linux64-cbindgen
+        - linux64-sccache
+        - linux64-node
+
 android-x86-nightly/opt:
     description: "Android 4.2 x86 Nightly"
     attributes:
         nightly: true
         enable-full-crashsymbols: true
     shipping-phase: promote
     shipping-product: fennec
     index:
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -431,16 +431,17 @@ class BuildOptionParser(object):
         'api-16-debug-artifact': 'builds/releng_sub_%s_configs/%s_api_16_debug_artifact.py',
         'api-16-gradle': 'builds/releng_sub_%s_configs/%s_api_16_gradle.py',
         'api-16-gradle-artifact': 'builds/releng_sub_%s_configs/%s_api_16_gradle_artifact.py',
         'api-16-without-google-play-services': 'builds/releng_sub_%s_configs/%s_api_16_without_google_play_services.py',
         'rusttests': 'builds/releng_sub_%s_configs/%s_rusttests.py',
         'rusttests-debug': 'builds/releng_sub_%s_configs/%s_rusttests_debug.py',
         'x86': 'builds/releng_sub_%s_configs/%s_x86.py',
         'x86-artifact': 'builds/releng_sub_%s_configs/%s_x86_artifact.py',
+        'x86-fuzzing-debug': 'builds/releng_sub_%s_configs/%s_x86_fuzzing_debug.py',
         'api-16-partner-sample1': 'builds/releng_sub_%s_configs/%s_api_16_partner_sample1.py',
         'aarch64': 'builds/releng_sub_%s_configs/%s_aarch64.py',
         'android-test': 'builds/releng_sub_%s_configs/%s_test.py',
         'android-test-ccov': 'builds/releng_sub_%s_configs/%s_test_ccov.py',
         'android-checkstyle': 'builds/releng_sub_%s_configs/%s_checkstyle.py',
         'android-lint': 'builds/releng_sub_%s_configs/%s_lint.py',
         'android-findbugs': 'builds/releng_sub_%s_configs/%s_findbugs.py',
         'android-geckoview-docs': 'builds/releng_sub_%s_configs/%s_geckoview_docs.py',
--- a/tools/fuzzing/faulty/Faulty.cpp
+++ b/tools/fuzzing/faulty/Faulty.cpp
@@ -358,17 +358,17 @@ Faulty::MutationFactor()
 void
 Faulty::MaybeCollectAndClosePipe(int aPipe, unsigned int aProbability)
 {
   if (!mFuzzPipes) {
     return;
   }
 
   if (aPipe > -1) {
-    FAULTY_LOG("Collecting pipe %d to bucket of pipes (count: %ld)",
+    FAULTY_LOG("Collecting pipe %d to bucket of pipes (count: %zu)",
                aPipe, mFds.size());
     mFds.insert(aPipe);
   }
 
   if (mFds.size() > 0 && FuzzingTraits::Sometimes(aProbability)) {
     std::set<int>::iterator it(mFds.begin());
     std::advance(it, FuzzingTraits::Random(mFds.size()));
     FAULTY_LOG("Trying to close collected pipe: %d", *it);