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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17import("//foundation/communication/dhcp/dhcp.gni") 18 19##############################fuzztest########################################## 20ohos_fuzztest("DhcpEventFuzzTest") { 21 module_out_path = dhcp_fuzz_output_path 22 fuzz_config_file = 23 "//foundation/communication/dhcp/test/fuzztest/dhcp_event_fuzzer" 24 25 include_dirs = [ 26 "//foundation/communication/dhcp/frameworks/native/include", 27 "//foundation/communication/dhcp/interfaces/inner_api", 28 "//foundation/communication/dhcp/interfaces/inner_api/include", 29 "//foundation/communication/dhcp/interfaces/kits/c", 30 "//foundation/communication/dhcp/services/utils/include", 31 "$DHCP_ROOT_DIR/services", 32 "$DHCP_ROOT_DIR/interfaces/", 33 "$DHCP_ROOT_DIR/interfaces/inner_api", 34 "$DHCP_ROOT_DIR/frameworks/native/include", 35 "$DHCP_ROOT_DIR/frameworks/native/src", 36 "$DHCP_ROOT_DIR/frameworks/native/interfaces", 37 "$DHCP_ROOT_DIR/test/fuzztest/fuzz_common_func", 38 "$DHCP_ROOT_DIR/services", 39 "$DHCP_ROOT_DIR/services/utils/include", 40 "$DHCP_ROOT_DIR/frameworks/native/include", 41 ] 42 43 cflags = [ 44 "-g", 45 "-O0", 46 "-Wno-unused-variable", 47 "-fno-omit-frame-pointer", 48 ] 49 cflags_cc = [ 50 "-std=c++17", 51 "-fno-rtti", 52 ] 53 54 sources = [ 55 "//foundation/communication/dhcp/frameworks/native/src/dhcp_event.cpp", 56 "dhcp_event_fuzzer.cpp", 57 ] 58 59 deps = [ "//foundation/communication/dhcp/services/utils:dhcp_utils" ] 60 61 external_deps = [ 62 "bounds_checking_function:libsec_shared", 63 "c_utils:utils", 64 "hilog:libhilog", 65 "safwk:system_ability_fwk", 66 "samgr:samgr_proxy", 67 ] 68 69 defines = [ 70 "DTFUZZ_TEST", 71 "private=public", 72 ] 73 74 part_name = "dhcp" 75 subsystem_name = "communication" 76} 77