blob: 9534bd85210e4c254dc9c9d04f55b496b1d9dbfc [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",
Leon Scroggins IIIbfab5052023-03-24 15:45:46 -040072 "-Wno-unused-function",
Alec Mourib2089a32022-01-15 00:34:20 +000073 ],
74 fuzz_config: {
75 cc: [
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053076 "android-cogs-eng@google.com",
Alec Mourib2089a32022-01-15 00:34:20 +000077 ],
Ayushi Khopkar7bf91892023-03-17 15:45:22 +053078 componentid: 1075131,
79 hotlists: [
80 "4593311",
81 ],
82 description: "The fuzzer targets the APIs of libsurfaceflinger library",
83 vector: "local_no_privileges_required",
84 service_privilege: "privileged",
85 users: "multi_user",
86 fuzzed_code_usage: "shipped",
Alec Mourib2089a32022-01-15 00:34:20 +000087 },
88}
89
90cc_fuzz {
91 name: "surfaceflinger_fuzzer",
92 defaults: [
93 "surfaceflinger_fuzz_defaults",
94 ],
95 srcs: [
96 "surfaceflinger_fuzzer.cpp",
97 ],
98}
Alec Mouri8c59b272022-01-15 00:34:20 +000099
100cc_fuzz {
101 name: "surfaceflinger_displayhardware_fuzzer",
102 defaults: [
103 "surfaceflinger_fuzz_defaults",
104 ],
105 srcs: [
106 "surfaceflinger_displayhardware_fuzzer.cpp",
107 ],
108 header_libs: [
109 "android.hardware.graphics.composer@2.4-command-buffer",
110 "android.hardware.graphics.composer@2.4-hal",
111 ],
112}
Chethan Kumar R E70750f22021-11-23 17:39:01 +0530113
114cc_fuzz {
115 name: "surfaceflinger_scheduler_fuzzer",
116 defaults: [
117 "surfaceflinger_fuzz_defaults",
118 ],
119 srcs: [
120 "surfaceflinger_scheduler_fuzzer.cpp",
121 ],
122}
Chethan Kumar R E041415a2021-11-23 17:42:22 +0530123
124cc_fuzz {
125 name: "surfaceflinger_layer_fuzzer",
126 defaults: [
127 "surfaceflinger_fuzz_defaults",
128 ],
129 header_libs: [
130 "libgui_headers",
131 ],
132 static_libs: [
133 "librenderengine",
134 ],
135 srcs: [
136 "surfaceflinger_layer_fuzzer.cpp",
137 ],
138}
Chethan Kumar R Ecd5229e2021-11-23 17:45:54 +0530139
140cc_fuzz {
141 name: "surfaceflinger_frametracer_fuzzer",
142 defaults: [
143 "surfaceflinger_fuzz_defaults",
144 ],
145 srcs: [
146 "surfaceflinger_frametracer_fuzzer.cpp",
147 ],
148}