blob: 243b8e04df08d09b26cd8e4b6ff4e59c82476126 [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",
42 "perfetto_trace_protos",
43 "libcompositionengine_mocks",
44 "perfetto_trace_protos",
45 ],
46 shared_libs: [
47 "libprotoutil",
48 "libstatssocket",
49 "libstatspull",
50 "libtimestats",
51 "libtimestats_proto",
52 "libprotobuf-cpp-full",
53 "android.hardware.graphics.mapper@2.0",
54 "android.hardware.graphics.mapper@3.0",
55 "android.hardware.graphics.mapper@4.0",
56 ],
57 srcs: [
58 ":libsurfaceflinger_sources",
59 ":libsurfaceflinger_mock_sources",
60 ],
61 defaults: [
62 "libsurfaceflinger_defaults",
63 ],
64 header_libs: [
65 "libui_fuzzableDataspaces_headers",
66 "libsurfaceflinger_headers",
67 "libui_headers",
68 ],
69 cflags: [
70 "-Wno-unused-result",
71 "-Wno-conversion",
72 "-Wno-sign-compare",
Leon Scroggins IIIbfab5052023-03-24 15:45:46 -040073 "-Wno-unused-function",
Alec Mourib2089a32022-01-15 00:34:20 +000074 ],
75 fuzz_config: {
76 cc: [
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053077 "android-cogs-eng@google.com",
Alec Mourib2089a32022-01-15 00:34:20 +000078 ],
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053079 componentid: 1075131,
80 hotlists: [
81 "4593311",
82 ],
83 description: "The fuzzer targets the APIs of libsurfaceflinger library",
84 vector: "local_no_privileges_required",
85 service_privilege: "privileged",
86 users: "multi_user",
87 fuzzed_code_usage: "shipped",
Alec Mourib2089a32022-01-15 00:34:20 +000088 },
89}
90
91cc_fuzz {
92 name: "surfaceflinger_fuzzer",
93 defaults: [
94 "surfaceflinger_fuzz_defaults",
95 ],
96 srcs: [
97 "surfaceflinger_fuzzer.cpp",
98 ],
99}
Alec Mouri8c59b272022-01-15 00:34:20 +0000100
101cc_fuzz {
102 name: "surfaceflinger_displayhardware_fuzzer",
103 defaults: [
104 "surfaceflinger_fuzz_defaults",
105 ],
106 srcs: [
107 "surfaceflinger_displayhardware_fuzzer.cpp",
108 ],
109 header_libs: [
110 "android.hardware.graphics.composer@2.4-command-buffer",
111 "android.hardware.graphics.composer@2.4-hal",
112 ],
113}
Chethan Kumar R E70750f22021-11-23 17:39:01 +0530114
115cc_fuzz {
116 name: "surfaceflinger_scheduler_fuzzer",
117 defaults: [
118 "surfaceflinger_fuzz_defaults",
119 ],
120 srcs: [
121 "surfaceflinger_scheduler_fuzzer.cpp",
122 ],
123}
Chethan Kumar R E041415a2021-11-23 17:42:22 +0530124
125cc_fuzz {
126 name: "surfaceflinger_layer_fuzzer",
127 defaults: [
128 "surfaceflinger_fuzz_defaults",
129 ],
130 header_libs: [
131 "libgui_headers",
132 ],
133 static_libs: [
134 "librenderengine",
135 ],
136 srcs: [
137 "surfaceflinger_layer_fuzzer.cpp",
138 ],
139}
Chethan Kumar R Ecd5229e2021-11-23 17:45:54 +0530140
141cc_fuzz {
142 name: "surfaceflinger_frametracer_fuzzer",
143 defaults: [
144 "surfaceflinger_fuzz_defaults",
145 ],
146 srcs: [
147 "surfaceflinger_frametracer_fuzzer.cpp",
148 ],
149}
Pawan Wagh1dd5f382023-06-01 23:43:10 +0000150
151cc_fuzz {
152 name: "surfaceflinger_service_fuzzer",
153 defaults: [
154 "surfaceflinger_fuzz_defaults",
155 "service_fuzzer_defaults",
156 "fuzzer_disable_leaks",
157 ],
158 srcs: [
159 "surfaceflinger_service_fuzzer.cpp",
160 ],
161 fuzz_config: {
162 triage_assignee: "waghpawan@google.com",
163 },
164}