blob: 618a583e68f42806d31198b85f8cf8cf5c9e8708 [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"],
John Reck38bc8a82024-02-21 17:08:27 -050025 default_team: "trendy_team_android_core_graphics_stack",
Bob Badourc26d6d52022-02-10 13:41:04 -080026}
27
Alec Mourib2089a32022-01-15 00:34:20 +000028cc_defaults {
29 name: "surfaceflinger_fuzz_defaults",
30 include_dirs: [
31 "frameworks/native/services/surfaceflinger/tests/unittests",
32 ],
33 static_libs: [
34 "android.hardware.graphics.composer@2.1-resources",
Patrick Williams8b731c12023-10-24 09:56:24 -050035 "libc++fs",
Alec Mourib2089a32022-01-15 00:34:20 +000036 "libgmock",
37 "libgui_mocks",
38 "libgmock_ndk",
39 "libgmock_main",
40 "libgtest_ndk_c++",
41 "libgmock_main_ndk",
42 "librenderengine_mocks",
Alec Mouri9b133ca2023-11-14 19:00:01 +000043 "libsurfaceflinger_common",
Alec Mourib2089a32022-01-15 00:34:20 +000044 "perfetto_trace_protos",
45 "libcompositionengine_mocks",
46 "perfetto_trace_protos",
47 ],
48 shared_libs: [
49 "libprotoutil",
50 "libstatssocket",
51 "libstatspull",
52 "libtimestats",
53 "libtimestats_proto",
54 "libprotobuf-cpp-full",
55 "android.hardware.graphics.mapper@2.0",
56 "android.hardware.graphics.mapper@3.0",
57 "android.hardware.graphics.mapper@4.0",
58 ],
59 srcs: [
60 ":libsurfaceflinger_sources",
61 ":libsurfaceflinger_mock_sources",
62 ],
63 defaults: [
64 "libsurfaceflinger_defaults",
65 ],
66 header_libs: [
67 "libui_fuzzableDataspaces_headers",
68 "libsurfaceflinger_headers",
69 "libui_headers",
70 ],
71 cflags: [
72 "-Wno-unused-result",
73 "-Wno-conversion",
74 "-Wno-sign-compare",
Leon Scroggins IIIbfab5052023-03-24 15:45:46 -040075 "-Wno-unused-function",
Alec Mourib2089a32022-01-15 00:34:20 +000076 ],
77 fuzz_config: {
78 cc: [
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053079 "android-cogs-eng@google.com",
Alec Mourib2089a32022-01-15 00:34:20 +000080 ],
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053081 componentid: 1075131,
82 hotlists: [
83 "4593311",
84 ],
85 description: "The fuzzer targets the APIs of libsurfaceflinger library",
86 vector: "local_no_privileges_required",
87 service_privilege: "privileged",
88 users: "multi_user",
89 fuzzed_code_usage: "shipped",
Alec Mourib2089a32022-01-15 00:34:20 +000090 },
91}
92
93cc_fuzz {
94 name: "surfaceflinger_fuzzer",
95 defaults: [
96 "surfaceflinger_fuzz_defaults",
97 ],
98 srcs: [
99 "surfaceflinger_fuzzer.cpp",
100 ],
101}
Alec Mouri8c59b272022-01-15 00:34:20 +0000102
103cc_fuzz {
104 name: "surfaceflinger_displayhardware_fuzzer",
105 defaults: [
106 "surfaceflinger_fuzz_defaults",
107 ],
108 srcs: [
109 "surfaceflinger_displayhardware_fuzzer.cpp",
110 ],
111 header_libs: [
112 "android.hardware.graphics.composer@2.4-command-buffer",
113 "android.hardware.graphics.composer@2.4-hal",
114 ],
115}
Chethan Kumar R E70750f22021-11-23 17:39:01 +0530116
117cc_fuzz {
118 name: "surfaceflinger_scheduler_fuzzer",
119 defaults: [
120 "surfaceflinger_fuzz_defaults",
121 ],
122 srcs: [
123 "surfaceflinger_scheduler_fuzzer.cpp",
124 ],
125}
Chethan Kumar R E041415a2021-11-23 17:42:22 +0530126
127cc_fuzz {
128 name: "surfaceflinger_layer_fuzzer",
129 defaults: [
130 "surfaceflinger_fuzz_defaults",
131 ],
132 header_libs: [
133 "libgui_headers",
134 ],
135 static_libs: [
136 "librenderengine",
137 ],
138 srcs: [
139 "surfaceflinger_layer_fuzzer.cpp",
140 ],
141}
Chethan Kumar R Ecd5229e2021-11-23 17:45:54 +0530142
143cc_fuzz {
144 name: "surfaceflinger_frametracer_fuzzer",
145 defaults: [
146 "surfaceflinger_fuzz_defaults",
147 ],
148 srcs: [
149 "surfaceflinger_frametracer_fuzzer.cpp",
150 ],
151}
Pawan Wagh1dd5f382023-06-01 23:43:10 +0000152
153cc_fuzz {
154 name: "surfaceflinger_service_fuzzer",
155 defaults: [
156 "surfaceflinger_fuzz_defaults",
157 "service_fuzzer_defaults",
158 "fuzzer_disable_leaks",
159 ],
160 srcs: [
161 "surfaceflinger_service_fuzzer.cpp",
162 ],
163 fuzz_config: {
164 triage_assignee: "waghpawan@google.com",
165 },
166}