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("StorageDaemonProxyFuzzTest") { 19 module_out_path = "storage_service/storage_service" 20 fuzz_config_file = "${storage_service_path}/test/fuzztest/storagedaemonproxy_fuzzer" 21 22 defines = [ 23 "STORAGE_LOG_TAG = \"storage_service\"", 24 "STORAGE_DAEMON_FUZZ_TEST", 25 ] 26 deps = [ 27 "${storage_daemon_path}/crypto:libsdcrypto", 28 "${storage_daemon_path}:storage_common_utils", 29 "${storage_daemon_path}:storage_daemon_ipc", 30 "${storage_interface_path}/innerkits/storage_manager/native:storage_manager_sa_proxy", 31 ] 32 33 sources = [ 34 "${storage_daemon_path}/ipc/src/storage_daemon.cpp", 35 "${storage_daemon_path}/ipc/src/storage_daemon_provider.cpp", 36 "${storage_daemon_path}/quota/quota_manager.cpp", 37 "${storage_daemon_path}/user/src/mount_manager.cpp", 38 "${storage_daemon_path}/user/src/mount_manager_ext.cpp", 39 "${storage_daemon_path}/user/src/user_manager.cpp", 40 "${storage_service_path}/test/fuzztest/storagedaemonproxy_fuzzer/storagedaemonproxy_fuzzer.cpp", 41 ] 42 43 configs = [ "${storage_daemon_path}:storage_daemon_config" ] 44 45 external_deps = [ 46 "ability_base:base", 47 "ability_base:want", 48 "ability_base:zuri", 49 "app_file_service:fileshare_native", 50 "app_file_service:fileuri_native", 51 "app_file_service:sandbox_helper_native", 52 "bounds_checking_function:libsec_shared", 53 "bundle_framework:appexecfwk_base", 54 "bundle_framework:appexecfwk_core", 55 "cJSON:cjson", 56 "c_utils:utils", 57 "eventhandler:libeventhandler", 58 "hicollie:libhicollie", 59 "hilog:libhilog", 60 "hisysevent:libhisysevent", 61 "hitrace:hitrace_meter", 62 "huks:libhukssdk", 63 "init:libbegetutil", 64 "ipc:ipc_single", 65 "openssl:libcrypto_shared", 66 "os_account:os_account_innerkits", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 ] 70 71 if (enable_user_auth_framework) { 72 defines += [ "USER_AUTH_FRAMEWORK" ] 73 external_deps += [ "user_auth_framework:userauth_client" ] 74 } 75 76 cflags = [ 77 "-g", 78 "-O0", 79 "-Wno-unused-variable", 80 "-fno-omit-frame-pointer", 81 ] 82} 83 84group("fuzztest") { 85 testonly = true 86 deps = [ ":StorageDaemonProxyFuzzTest" ] 87} 88