blob: d43a16dfe801706a0dbd31887dba00d15c6f0e28 [file] [log] [blame]
Alec Mourib2089a32022-01-15 00:34:20 +00001/*
2 * Copyright 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
Bob Badourc26d6d52022-02-10 13:41:04 -080018package {
19 // See: http://go/android-license-faq
20 // A large-scale-change added 'default_applicable_licenses' to import
21 // all of the 'license_kinds' from "frameworks_native_license"
22 // to get the below license kinds:
23 // SPDX-license-identifier-Apache-2.0
24 default_applicable_licenses: ["frameworks_native_license"],
25}
26
Alec Mourib2089a32022-01-15 00:34:20 +000027cc_defaults {
28 name: "surfaceflinger_fuzz_defaults",
29 include_dirs: [
30 "frameworks/native/services/surfaceflinger/tests/unittests",
31 ],
32 static_libs: [
33 "android.hardware.graphics.composer@2.1-resources",
34 "libgmock",
35 "libgui_mocks",
36 "libgmock_ndk",
37 "libgmock_main",
38 "libgtest_ndk_c++",
39 "libgmock_main_ndk",
40 "librenderengine_mocks",
41 "perfetto_trace_protos",
42 "libcompositionengine_mocks",
43 "perfetto_trace_protos",
44 ],
45 shared_libs: [
46 "libprotoutil",
47 "libstatssocket",
48 "libstatspull",
49 "libtimestats",
50 "libtimestats_proto",
51 "libprotobuf-cpp-full",
52 "android.hardware.graphics.mapper@2.0",
53 "android.hardware.graphics.mapper@3.0",
54 "android.hardware.graphics.mapper@4.0",
55 ],
56 srcs: [
57 ":libsurfaceflinger_sources",
58 ":libsurfaceflinger_mock_sources",
59 ],
60 defaults: [
61 "libsurfaceflinger_defaults",
62 ],
63 header_libs: [
64 "libui_fuzzableDataspaces_headers",
65 "libsurfaceflinger_headers",
66 "libui_headers",
67 ],
68 cflags: [
69 "-Wno-unused-result",
70 "-Wno-conversion",
71 "-Wno-sign-compare",
72 ],
73 fuzz_config: {
74 cc: [
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053075 "android-cogs-eng@google.com",
Alec Mourib2089a32022-01-15 00:34:20 +000076 ],
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053077 componentid: 1075131,
78 hotlists: [
79 "4593311",
80 ],
81 description: "The fuzzer targets the APIs of libsurfaceflinger library",
82 vector: "local_no_privileges_required",
83 service_privilege: "privileged",
84 users: "multi_user",
85 fuzzed_code_usage: "shipped",
Alec Mourib2089a32022-01-15 00:34:20 +000086 },
87}
88
89cc_fuzz {
90 name: "surfaceflinger_fuzzer",
91 defaults: [
92 "surfaceflinger_fuzz_defaults",
93 ],
94 srcs: [
95 "surfaceflinger_fuzzer.cpp",
96 ],
97}
Alec Mouri8c59b272022-01-15 00:34:20 +000098
99cc_fuzz {
100 name: "surfaceflinger_displayhardware_fuzzer",
101 defaults: [
102 "surfaceflinger_fuzz_defaults",
103 ],
104 srcs: [
105 "surfaceflinger_displayhardware_fuzzer.cpp",
106 ],
107 header_libs: [
108 "android.hardware.graphics.composer@2.4-command-buffer",
109 "android.hardware.graphics.composer@2.4-hal",
110 ],
111}
Chethan Kumar R E70750f22021-11-23 17:39:01 +0530112
113cc_fuzz {
114 name: "surfaceflinger_scheduler_fuzzer",
115 defaults: [
116 "surfaceflinger_fuzz_defaults",
117 ],
118 srcs: [
119 "surfaceflinger_scheduler_fuzzer.cpp",
120 ],
121}
Chethan Kumar R E041415a2021-11-23 17:42:22 +0530122
123cc_fuzz {
124 name: "surfaceflinger_layer_fuzzer",
125 defaults: [
126 "surfaceflinger_fuzz_defaults",
127 ],
128 header_libs: [
129 "libgui_headers",
130 ],
131 static_libs: [
132 "librenderengine",
133 ],
134 srcs: [
135 "surfaceflinger_layer_fuzzer.cpp",
136 ],
137}