• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/config/features.gni")
15import("//build/test.gni")
16import("//foundation/filemanagement/storage_service/storage_service_aafwk.gni")
17
18ohos_fuzztest("StorageManagerStubFuzzTest") {
19  module_out_path = "storage_service/storage_service"
20  fuzz_config_file = "${storage_service_path}/test/fuzztest/storagemanagerstub_fuzzer"
21
22  defines = [
23    "STORAGE_LOG_TAG = \"storage_service\"",
24    "STORAGE_DAEMON_FUZZ_TEST",
25  ]
26  deps = [
27    "${storage_daemon_path}:storage_common_utils",
28    "${storage_daemon_path}:storage_daemon_ipc",
29    "${storage_interface_path}/innerkits/storage_manager/native:storage_manager_sa_proxy",
30    "${storage_service_path}/services/storage_manager:storage_manager",
31  ]
32
33  sources = [
34    "${storage_service_path}/test/fuzztest/storagemanagerstub_fuzzer/storagemanagerstub_fuzzer.cpp",
35  ]
36
37  external_deps = [
38    "ability_base:base",
39    "ability_base:want",
40    "ability_base:zuri",
41    "app_file_service:fileshare_native",
42    "app_file_service:fileuri_native",
43    "app_file_service:sandbox_helper_native",
44    "bounds_checking_function:libsec_shared",
45    "bundle_framework:appexecfwk_base",
46    "bundle_framework:appexecfwk_core",
47    "cJSON:cjson",
48    "c_utils:utils",
49    "eventhandler:libeventhandler",
50    "hicollie:libhicollie",
51    "hilog:libhilog",
52    "hisysevent:libhisysevent",
53    "hitrace:hitrace_meter",
54    "huks:libhukssdk",
55    "init:libbegetutil",
56    "ipc:ipc_single",
57    "openssl:libcrypto_shared",
58    "os_account:os_account_innerkits",
59    "safwk:system_ability_fwk",
60    "samgr:samgr_proxy",
61  ]
62
63  if (enable_user_auth_framework) {
64    defines += [ "USER_AUTH_FRAMEWORK" ]
65    external_deps += [ "user_auth_framework:userauth_client" ]
66  }
67
68  cflags = [
69    "-g",
70    "-O0",
71    "-Wno-unused-variable",
72    "-fno-omit-frame-pointer",
73  ]
74}
75
76group("fuzztest") {
77  testonly = true
78  deps = [ ":StorageManagerStubFuzzTest" ]
79}
80