File tree Expand file tree Collapse file tree 11 files changed +77
-162
lines changed
src/sys/fuzzing/realmfuzzer Expand file tree Collapse file tree 11 files changed +77
-162
lines changed Original file line number Diff line number Diff line change 44
55// This manifest shard corresponds to the fuzz target adapter component, which
66// maps test inputs from the engine to the target component(s) being fuzzed.
7+ //
8+ // To create a realm fuzzer adapter component, include this shard and specify
9+ // the program name, arguments, and capability routes.
10+ //
11+ // Example:
12+ // {
13+ // include: [ "//src/sys/fuzzing/realmfuzzer/adapter/llvm.shard.cml" ],
14+ // program: {
15+ // name: "adapter",
16+ // },
17+ // use: [
18+ // { protocol: "foo.bar.Baz" },
19+ // ],
20+ // }
21+ //
22+ // See also //src/sys/fuzzing/realmfuzzer/fuzzer.shard.cml.
723{
8- include: [
9- "//sdk/lib/inspect/client.shard.cml",
10- "syslog/client.shard.cml",
11- ],
24+ include: [ "//src/sys/fuzzing/realmfuzzer/target/default.shard.cml" ],
1225 program: {
1326 runner: "elf",
1427 },
1528 capabilities: [
16- {
17- protocol: [ "fuchsia.fuzzer.TargetAdapter" ],
18- },
29+ { protocol: "fuchsia.fuzzer.TargetAdapter" },
1930 ],
2031 expose: [
2132 {
22- protocol: [ "fuchsia.fuzzer.TargetAdapter" ] ,
33+ protocol: "fuchsia.fuzzer.TargetAdapter",
2334 from: "self",
2435 },
2536 ],
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44{
5- include: [ "syslog/client .shard.cml" ],
5+ include: [ "//src/sys/fuzzing/realmfuzzer/adapters/llvm .shard.cml" ],
66 program: {
7- runner: "elf",
87 binary: "bin/realmfuzzer_coverage_test_adapter",
98 },
10- capabilities: [
11- { protocol: "fuchsia.fuzzer.TargetAdapter" },
12- ],
13- use: [
14- {
15- protocol: "fuchsia.fuzzer.CoverageDataCollector",
16- from: "debug",
17- },
18- ],
19- expose: [
20- {
21- protocol: "fuchsia.fuzzer.TargetAdapter",
22- from: "self",
23- },
24- ],
259}
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- // This manifest shard corresponds to both the "real" and "test" engines used in
6- // fuzzers and fuzzer tests, respectively .
5+ // This manifest shard provides the portions of the engine component description
6+ // shared between both the fuzzing engine and the integration tests .
77{
88 include: [
9- "//sdk/lib/ inspect/client.shard.cml",
9+ "inspect/client.shard.cml",
1010 "syslog/client.shard.cml",
1111 ],
1212 children: [
1313 {
14- name: "fuzzer ",
15- url: "#meta/fuzzer .cm",
14+ name: "coverage ",
15+ url: "#meta/coverage .cm",
1616 },
1717 ],
1818 use: [
1919 {
2020 protocol: "fuchsia.fuzzer.TargetAdapter",
21- from: "#fuzzer ",
21+ from: "#adapter ",
2222 },
23+ {
24+ protocol: "fuchsia.fuzzer.CoverageDataProvider",
25+ from: "#coverage",
26+ },
27+ { protocol: "fuchsia.process.Launcher" },
2328 ],
2429 offer: [
2530 {
2631 protocol: [ "fuchsia.process.Launcher" ],
2732 from: "parent",
28- to: "#fuzzer ",
33+ to: "#adapter ",
2934 },
3035 ],
3136}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // Copyright 2022 The Fuchsia Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ // This manifest corresponds to a realm fuzzing engine component.
6+ //
7+ // To create a realm fuzzer engine component manifest file, include this shard
8+ // and define a child named "adapter" that uses the "fuzzed-env" environment.
9+ //
10+ // Example:
11+ // {
12+ // include: [ "//src/sys/fuzzing/realmfuzzer/fuzzer.shard.cml" ],
13+ // children: [
14+ // {
15+ // name: "adapter",
16+ // url: "#meta/foo_fuzz_adapter.cm",
17+ // environment: "#fuzzed-env",
18+ // },
19+ // ],
20+ // }
21+ //
22+ // See also //src/sys/fuzzing/realmfuzzer/adapters/llvm.shard.cml.
23+ {
24+ include: [
25+ "//src/sys/fuzzing/realmfuzzer/coverage/fuzzed-env.shard.cml",
26+ "//src/sys/fuzzing/realmfuzzer/engine/default.shard.cml",
27+ "//src/sys/test_runners/fuzz/default.shard.cml",
28+ ],
29+ program: {
30+ binary: "bin/realmfuzzer_engine",
31+ },
32+ }
Original file line number Diff line number Diff line change 55// This manifest shard corresponds to a component being fuzzed, which produces
66// coverage data as a result of actions taken by the adapter component.
77{
8+ include: [
9+ "inspect/client.shard.cml",
10+ "syslog/client.shard.cml",
11+ ],
812 use: [
913 {
1014 protocol: "fuchsia.fuzzer.CoverageDataCollector",
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ group("tests") {
1414 ]
1515}
1616
17- executable (" fuzzer-bin " ) {
17+ executable (" adapter " ) {
1818 testonly = true
1919 output_name = " realmfuzzer_test_fuzzer"
2020 deps = [
@@ -26,10 +26,11 @@ executable("fuzzer-bin") {
2626 exclude_toolchain_tags = [ " instrumented" ]
2727}
2828
29- fuchsia_test_component (" fuzzer" ) {
30- manifest = " meta/fuzzer.cml"
29+ fuchsia_test_component (" adapter-component" ) {
30+ component_name = " adapter"
31+ manifest = " meta/adapter.cml"
3132 deps = [
32- " :fuzzer-bin " ,
33+ " :adapter " ,
3334 " //src/sys/fuzzing/common/testing/data:corpus" ,
3435 ]
3536}
@@ -56,7 +57,7 @@ fuchsia_test_package("integration-tests-pkg") {
5657 package_name = " realmfuzzer-integration-tests"
5758 test_components = [ " :integration-tests" ]
5859 deps = [
59- " :fuzzer " ,
60+ " :adapter-component " ,
6061 " //src/sys/fuzzing/realmfuzzer/coverage" ,
6162 ]
6263}
Original file line number Diff line number Diff line change 11// Copyright 2022 The Fuchsia Authors. All rights reserved.
22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
4-
5- // This manifest corresponds to the fuzzer used by the integration tests.
64{
75 include: [ "//src/sys/fuzzing/realmfuzzer/adapters/llvm.shard.cml" ],
86 program: {
9- runner: "elf",
107 binary: "bin/realmfuzzer_test_fuzzer",
118 args: [ "data/corpus" ],
129 },
13- use: [
14- {
15- protocol: "fuchsia.fuzzer.CoverageDataCollector",
16- from: "debug",
17- },
18- ],
1910}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66// tests.
77{
88 include: [
9- "//sdk/lib/inspect/client.shard.cml",
109 "//src/sys/fuzzing/realmfuzzer/coverage/fuzzed-env.shard.cml",
10+ "//src/sys/fuzzing/realmfuzzer/engine/default.shard.cml",
1111 "//src/sys/test_runners/gtest/default.shard.cml",
12- "inspect/offer.shard.cml",
13- "syslog/client.shard.cml",
1412 ],
1513 program: {
1614 binary: "test/realmfuzzer_integration_tests",
1715 },
1816 children: [
1917 {
20- name: "coverage",
21- url: "#meta/coverage.cm",
22- },
23- {
24- name: "engine",
25- url: "#meta/engine.cm",
26- },
27- {
28- name: "fuzzer",
29- url: "#meta/fuzzer.cm",
18+ name: "adapter",
19+ url: "#meta/adapter.cm",
3020 environment: "#fuzzed-env",
3121 },
3222 ],
33- use: [
34- {
35- protocol: "fuchsia.fuzzer.TargetAdapter",
36- from: "#fuzzer",
37- },
38- {
39- protocol: "fuchsia.fuzzer.CoverageDataProvider",
40- from: "#coverage",
41- },
42- {
43- protocol: [ "fuchsia.process.Launcher" ],
44- from: "parent",
45- },
46- ],
47- offer: [
48- {
49- protocol: [ "fuchsia.process.Launcher" ],
50- from: "parent",
51- to: [
52- "#coverage",
53- "#fuzzer",
54- ],
55- },
56- ],
5723}
You can’t perform that action at this time.
0 commit comments