From 432b7e379f1f354ff696488c3b829d5135a5988d Mon Sep 17 00:00:00 2001 From: "zhaojian@huawei.com" Date: Sat, 5 Nov 2022 12:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaojian@huawei.com Change-Id: I74758ef837afadc616e799dbcc14d53a33052c5f --- test/fuzztest/BUILD.gn | 2 +- test/fuzztest/util_fuzzer/BUILD.gn | 5 +++-- test/fuzztest/util_fuzzer/util_fuzzer.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index e5e6a0c9b25..a3fba754046 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -19,8 +19,8 @@ group("fuzztest") { if (!is_asan) { deps = [ "imageloader_fuzzer:ImageLoaderFuzzTest", - "uiservice_fuzzer:UiServiceFuzzTest", "res_fuzzer:ResFuzzTest", + "uiservice_fuzzer:UiServiceFuzzTest", "util_fuzzer:UtilFuzzTest", ] } diff --git a/test/fuzztest/util_fuzzer/BUILD.gn b/test/fuzztest/util_fuzzer/BUILD.gn index 1fa2156ced3..42a4ac741e6 100644 --- a/test/fuzztest/util_fuzzer/BUILD.gn +++ b/test/fuzztest/util_fuzzer/BUILD.gn @@ -33,6 +33,8 @@ ohos_fuzztest("UtilFuzzTest") { "$ace_root/frameworks/base/json/json_util.cpp", "$ace_root/frameworks/base/utils/resource_configuration.cpp", "//third_party/cJSON/cJSON.c", + "$ace_root/frameworks/base/log/dump_log.cpp", + "$ace_root/adapter/ohos/osal/log_wrapper.cpp" ] include_dirs = [ "$ace_root/frameworks/base/utils", @@ -43,8 +45,7 @@ ohos_fuzztest("UtilFuzzTest") { ] deps = [ - "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", + #"$ace_root/adapter/ohos/osal:ace_osal_ohos", "//foundation/window/window_manager/utils:libwmutil", "//foundation/window/window_manager/wm:libwm", "//third_party/icu/icu4c:shared_icui18n", diff --git a/test/fuzztest/util_fuzzer/util_fuzzer.cpp b/test/fuzztest/util_fuzzer/util_fuzzer.cpp index 1e81117cd70..a222fbcec08 100644 --- a/test/fuzztest/util_fuzzer/util_fuzzer.cpp +++ b/test/fuzztest/util_fuzzer/util_fuzzer.cpp @@ -25,10 +25,10 @@ namespace OHOS { bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size) { bool result = false; - // ResourceConfiguration r; - // uint32_t update = 0; - // std::string s; - // r.UpdateFromJsonString(s,update); + ResourceConfiguration r; + uint32_t update = 0; + std::string s; + r.UpdateFromJsonString(s,update); return result; } }