blob: ab3b3528ddb90f528de01d70d173697117eea6f2 [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",
Patrick Williams8b731c12023-10-24 09:56:24 -050034 "libc++fs",
Alec Mourib2089a32022-01-15 00:34:20 +000035 "libgmock",
36 "libgui_mocks",
37 "libgmock_ndk",
38 "libgmock_main",
39 "libgtest_ndk_c++",
40 "libgmock_main_ndk",
41 "librenderengine_mocks",
Alec Mouri9b133ca2023-11-14 19:00:01 +000042 "libsurfaceflinger_common",
Alec Mourib2089a32022-01-15 00:34:20 +000043 "perfetto_trace_protos",
44 "libcompositionengine_mocks",
45 "perfetto_trace_protos",
46 ],
47 shared_libs: [
48 "libprotoutil",
49 "libstatssocket",
50 "libstatspull",
51 "libtimestats",
52 "libtimestats_proto",
53 "libprotobuf-cpp-full",
54 "android.hardware.graphics.mapper@2.0",
55 "android.hardware.graphics.mapper@3.0",
56 "android.hardware.graphics.mapper@4.0",
57 ],
58 srcs: [
59 ":libsurfaceflinger_sources",
60 ":libsurfaceflinger_mock_sources",
61 ],
62 defaults: [
63 "libsurfaceflinger_defaults",
64 ],
65 header_libs: [
66 "libui_fuzzableDataspaces_headers",
67 "libsurfaceflinger_headers",
68 "libui_headers",
69 ],
70 cflags: [
71 "-Wno-unused-result",
72 "-Wno-conversion",
73 "-Wno-sign-compare",
Leon Scroggins IIIbfab5052023-03-24 15:45:46 -040074 "-Wno-unused-function",
Alec Mourib2089a32022-01-15 00:34:20 +000075 ],
76 fuzz_config: {
77 cc: [
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053078 "android-cogs-eng@google.com",
Alec Mourib2089a32022-01-15 00:34:20 +000079 ],
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053080 componentid: 1075131,
81 hotlists: [
82 "4593311",
83 ],
84 description: "The fuzzer targets the APIs of libsurfaceflinger library",
85 vector: "local_no_privileges_required",
86 service_privilege: "privileged",
87 users: "multi_user",
88 fuzzed_code_usage: "shipped",
Alec Mourib2089a32022-01-15 00:34:20 +000089 },
90}
91
92cc_fuzz {
93 name: "surfaceflinger_fuzzer",
94 defaults: [
95 "surfaceflinger_fuzz_defaults",
96 ],
97 srcs: [
98 "surfaceflinger_fuzzer.cpp",
99 ],
100}
Alec Mouri8c59b272022-01-15 00:34:20 +0000101
102cc_fuzz {
103 name: "surfaceflinger_displayhardware_fuzzer",
104 defaults: [
105 "surfaceflinger_fuzz_defaults",
106 ],
107 srcs: [
108 "surfaceflinger_displayhardware_fuzzer.cpp",
109 ],
110 header_libs: [
111 "android.hardware.graphics.composer@2.4-command-buffer",
112 "android.hardware.graphics.composer@2.4-hal",
113 ],
114}
Chethan Kumar R E70750f22021-11-23 17:39:01 +0530115
116cc_fuzz {
117 name: "surfaceflinger_scheduler_fuzzer",
118 defaults: [
119 "surfaceflinger_fuzz_defaults",
120 ],
121 srcs: [
122 "surfaceflinger_scheduler_fuzzer.cpp",
123 ],
124}
Chethan Kumar R E041415a2021-11-23 17:42:22 +0530125
126cc_fuzz {
127 name: "surfaceflinger_layer_fuzzer",
128 defaults: [
129 "surfaceflinger_fuzz_defaults",
130 ],
131 header_libs: [
132 "libgui_headers",
133 ],
134 static_libs: [
135 "librenderengine",
136 ],
137 srcs: [
138 "surfaceflinger_layer_fuzzer.cpp",
139 ],
140}
Chethan Kumar R Ecd5229e2021-11-23 17:45:54 +0530141
142cc_fuzz {
143 name: "surfaceflinger_frametracer_fuzzer",
144 defaults: [
145 "surfaceflinger_fuzz_defaults",
146 ],
147 srcs: [
148 "surfaceflinger_frametracer_fuzzer.cpp",
149 ],
150}
Pawan Wagh1dd5f382023-06-01 23:43:10 +0000151
152cc_fuzz {
153 name: "surfaceflinger_service_fuzzer",
154 defaults: [
155 "surfaceflinger_fuzz_defaults",
156 "service_fuzzer_defaults",
157 "fuzzer_disable_leaks",
158 ],
159 srcs: [
160 "surfaceflinger_service_fuzzer.cpp",
161 ],
162 fuzz_config: {
163 triage_assignee: "waghpawan@google.com",
164 },
165}