Bug 1742857 - Add Grizzly fuzzing framework smoke test. r?tsmith,ahal draft
authorJesse Schwartzentruber <truber@mozilla.com>
Fri, 26 Nov 2021 22:10:49 +0000
changeset 4097839 ba01fe08f381857c650e204bdff7fa0e45b2f55f
parent 4097380 63cb32ec323baa4489768e0c1d2a8da48cb5d37a
child 4097840 a85afe85fad88b150becaabfad487442600a5306
push id755111
push userreviewbot
push dateFri, 26 Nov 2021 22:11:09 +0000
treeherdertry@a85afe85fad8 [default view] [failures only]
reviewerstsmith, ahal
bugs1742857
milestone96.0a1
Bug 1742857 - Add Grizzly fuzzing framework smoke test. r?tsmith,ahal Summary: Differential Revision: https://phabricator.services.mozilla.com/D132279 Test Plan: Reviewers: tsmith, ahal Subscribers: Bug #: 1742857 Differential Diff: PHID-DIFF-h44slcwoymjwspxrqxvo
taskcluster/ci/fuzzing/kind.yml
tools/fuzzing/smoke/grizzly_requirements.in
tools/fuzzing/smoke/grizzly_requirements.txt
tools/fuzzing/smoke/python.ini
tools/fuzzing/smoke/test_grizzly.py
tools/moz.build
--- a/taskcluster/ci/fuzzing/kind.yml
+++ b/taskcluster/ci/fuzzing/kind.yml
@@ -10,36 +10,57 @@ transforms:
     - gecko_taskgraph.transforms.task:transforms
 
 kind-dependencies:
     - fetch
     - toolchain
     - build
 
 job-defaults:
-    platform: linux64/opt
-    require-build:
-        linux64/opt: build-linux64/opt
     worker-type: b-linux
     worker:
         max-run-time: 3600
         docker-image: {in-tree: debian11-amd64-build}
-        env:
-            LD_LIBRARY_PATH: /builds/worker/fetches
-            JSSHELL: ./js
     treeherder:
         kind: test
         tier: 3
-    fetches:
-        build:
-            - target.jsshell.zip
-            - target.fuzztest.tests.tar.gz
 
 jobs:
     simple:
+        platform: linux64/opt
+        require-build:
+            linux64/opt: build-linux64/opt
         description: Simple Fuzzing Test
         treeherder:
             symbol: simple-fuzzing
+        fetches:
+            build:
+                - target.jsshell.zip
+                - target.fuzztest.tests.tar.gz
+        worker:
+            env:
+                LD_LIBRARY_PATH: /builds/worker/fetches
+                JSSHELL: ./js
         run:
             using: run-task
             command: >-
                 cd $MOZ_FETCHES_DIR &&
                 python3 tools/fuzzing/smoke/smoke.py
+
+    python:
+        platform: linux64-asan-fuzzing/opt
+        require-build:
+            linux64-asan-fuzzing/opt: build-linux64-asan-fuzzing/opt
+        description: Python Fuzzing Smoke Tests
+        treeherder:
+            symbol: fuzzing-python
+        fetches:
+            build:
+                - target.tar.bz2
+        run:
+            using: run-task
+            cwd: '{checkout}'
+            command: >
+                export GECKO_BINARY_PATH=$MOZ_FETCHES_DIR/firefox/firefox &&
+                ./mach python-test --subsuite fuzzing
+        when:
+            files-changed:
+                - 'tools/fuzzing/smoke/**'
new file mode 100644
--- /dev/null
+++ b/tools/fuzzing/smoke/grizzly_requirements.in
@@ -0,0 +1,1 @@
+grizzly-framework==0.14.0
new file mode 100644
--- /dev/null
+++ b/tools/fuzzing/smoke/grizzly_requirements.txt
@@ -0,0 +1,111 @@
+#
+# This file is autogenerated by pip-compile with python 3.9
+# To update, run:
+#
+#    pip-compile --generate-hashes --output-file=tools/fuzzing/smoke/grizzly_requirements.txt tools/fuzzing/smoke/grizzly_requirements.in
+#
+certifi==2021.10.8 \
+    --hash=sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872 \
+    --hash=sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569
+    # via requests
+charset-normalizer==2.0.8 \
+    --hash=sha256:735e240d9a8506778cd7a453d97e817e536bb1fc29f4f6961ce297b9c7a917b0 \
+    --hash=sha256:83fcdeb225499d6344c8f7f34684c2981270beacc32ede2e669e94f7fa544405
+    # via requests
+cssbeautifier==1.14.0 \
+    --hash=sha256:20be1f47f20762db32c78124ff44d351ba13894fa8e7cfe34014b672f9f6ecb2
+    # via grizzly-framework
+editorconfig==0.12.3 \
+    --hash=sha256:6b0851425aa875b08b16789ee0eeadbd4ab59666e9ebe728e526314c4a2e52c1
+    # via
+    #   cssbeautifier
+    #   jsbeautifier
+fasteners==0.16.3 \
+    --hash=sha256:8408e52656455977053871990bd25824d85803b9417aa348f10ba29ef0c751f7
+    # via
+    #   fuzzmanager
+    #   grizzly-framework
+ffpuppet==0.8.7 \
+    --hash=sha256:ed68871d5b88d0852722dca2332e61d893749523d660a97dfa11018e0b9c040d
+    # via grizzly-framework
+fuzzmanager==0.4.1 \
+    --hash=sha256:2bb17b5a725d8d6f03eb9979a75416a1137b7456c95a581a50c7b542fbf3d174
+    # via grizzly-framework
+grizzly-framework==0.14.0 \
+    --hash=sha256:3cebe4854203a5cbe39fb970b6ec1ba47bce80786ac3b7ef5e293a529349ab4b \
+    --hash=sha256:d1c7c1425110344f09cbe7e9d92800bd9907811a0b518e3b0b385b10246579d0
+    # via -r tools/fuzzing/smoke/grizzly_requirements.in
+idna==3.3 \
+    --hash=sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff \
+    --hash=sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d
+    # via requests
+jsbeautifier==1.14.0 \
+    --hash=sha256:84fdb008d8af89619269a6aca702288b48f837a99427a0f529aa57ecfb36ee3c
+    # via
+    #   cssbeautifier
+    #   grizzly-framework
+lithium-reducer==0.6.1 \
+    --hash=sha256:ea2f77f496fc57bcb4d74209210c2ec84b1b327a7b707f98655f85575b6fcc16
+    # via grizzly-framework
+prefpicker==1.0.25 \
+    --hash=sha256:ab70f854dbf26f41fd175d8e525b077edf1af05eebe7f111bacfb6af819c626a
+    # via grizzly-framework
+psutil==5.8.0 \
+    --hash=sha256:90d4091c2d30ddd0a03e0b97e6a33a48628469b99585e2ad6bf21f17423b112b
+    # via
+    #   ffpuppet
+    #   grizzly-framework
+pyyaml==6.0 \
+    --hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \
+    --hash=sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b \
+    --hash=sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57 \
+    --hash=sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b \
+    --hash=sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4 \
+    --hash=sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07 \
+    --hash=sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba \
+    --hash=sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9 \
+    --hash=sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287 \
+    --hash=sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513 \
+    --hash=sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0 \
+    --hash=sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0 \
+    --hash=sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92 \
+    --hash=sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f \
+    --hash=sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 \
+    --hash=sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc \
+    --hash=sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c \
+    --hash=sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86 \
+    --hash=sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4 \
+    --hash=sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c \
+    --hash=sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34 \
+    --hash=sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b \
+    --hash=sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c \
+    --hash=sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb \
+    --hash=sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737 \
+    --hash=sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3 \
+    --hash=sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d \
+    --hash=sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53 \
+    --hash=sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78 \
+    --hash=sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803 \
+    --hash=sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a \
+    --hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \
+    --hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5
+    # via prefpicker
+requests==2.26.0 \
+    --hash=sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24 \
+    --hash=sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7
+    # via fuzzmanager
+six==1.16.0 \
+    --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
+    --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
+    # via
+    #   cssbeautifier
+    #   fasteners
+    #   fuzzmanager
+    #   jsbeautifier
+urllib3==1.26.7 \
+    --hash=sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece \
+    --hash=sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844
+    # via requests
+xvfbwrapper==0.2.9 \
+    --hash=sha256:bcf4ae571941b40254faf7a73432dfc119ad21ce688f1fdec533067037ecfc24
+    # via ffpuppet
new file mode 100644
--- /dev/null
+++ b/tools/fuzzing/smoke/python.ini
@@ -0,0 +1,6 @@
+[DEFAULT]
+subsuite = fuzzing
+skip-if = python == 2
+
+[test_grizzly.py]
+requirements = tools/fuzzing/smoke/grizzly_requirements.txt
new file mode 100644
--- /dev/null
+++ b/tools/fuzzing/smoke/test_grizzly.py
@@ -0,0 +1,31 @@
+from subprocess import check_call
+import os.path
+import sys
+
+from moztest.selftest import fixtures
+import mozunit
+
+
+def test_grizzly_smoke():
+    ffbin = fixtures.binary()
+    assert os.path.exists(ffbin), "Missing Firefox build. Build it, or set GECKO_BINARY_PATH"
+
+    check_call(
+        [
+            sys.executable,
+            "-m",
+            "grizzly",
+            ffbin,
+            "no-op",
+            "--xvfb",
+            "--smoke-test",
+            "--limit",
+            "10",
+            "--relaunch",
+            "5",
+        ],
+    )
+
+
+if __name__ == "__main__":
+    mozunit.main()
--- a/tools/moz.build
+++ b/tools/moz.build
@@ -68,11 +68,12 @@ SPHINX_TREES["profiler"] = "profiler/doc
 with Files("tryselect/docs/**"):
     SCHEDULES.exclusive = ["docs"]
 
 CRAMTEST_MANIFESTS += [
     "tryselect/test/cram.ini",
 ]
 
 PYTHON_UNITTEST_MANIFESTS += [
+    "fuzzing/smoke/python.ini",
     "lint/test/python.ini",
     "tryselect/test/python.ini",
 ]