diff --git a/BUILD.gn b/BUILD.gn index 806ab5b..0d60da4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -35,27 +35,27 @@ group("deviceauth_test_build") { if (os_level == "standard") { testonly = true deps += [ - "test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer:fuzztest", - "test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer:fuzztest", - "test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer:fuzztest", + "test/fuzztest/group_auth/authdevice_fuzzer:fuzztest", + "test/fuzztest/group_auth/processauthdata_fuzzer:fuzztest", + "test/fuzztest/group_manage/addmember_fuzzer:fuzztest", + "test/fuzztest/group_manage/checkaccess_fuzzer:fuzztest", + "test/fuzztest/group_manage/creategroup_fuzzer:fuzztest", + "test/fuzztest/group_manage/deletegroup_fuzzer:fuzztest", + "test/fuzztest/group_manage/deletemember_fuzzer:fuzztest", + "test/fuzztest/group_manage/getdeviceinfobyid_fuzzer:fuzztest", + "test/fuzztest/group_manage/getgroupinfo_fuzzer:fuzztest", + "test/fuzztest/group_manage/getgroupinfobyid_fuzzer:fuzztest", + "test/fuzztest/group_manage/getjoinedgroups_fuzzer:fuzztest", + "test/fuzztest/group_manage/getpkinfolist_fuzzer:fuzztest", + "test/fuzztest/group_manage/getregisterinfo_fuzzer:fuzztest", + "test/fuzztest/group_manage/getrelatedgroups_fuzzer:fuzztest", + "test/fuzztest/group_manage/gettrusteddevices_fuzzer:fuzztest", + "test/fuzztest/group_manage/isdeviceingroup_fuzzer:fuzztest", + "test/fuzztest/group_manage/processbinddata_fuzzer:fuzztest", + "test/fuzztest/group_manage/registercallback_fuzzer:fuzztest", + "test/fuzztest/group_manage/registerdatachangelistener_fuzzer:fuzztest", + "test/fuzztest/group_manage/unregistercallback_fuzzer:fuzztest", + "test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer:fuzztest", "test/unittest/deviceauth:deviceauth_llt", ] } diff --git a/test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/BUILD.gn b/test/fuzztest/group_auth/authdevice_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/BUILD.gn rename to test/fuzztest/group_auth/authdevice_fuzzer/BUILD.gn index 17ab43f..550cc22 100644 --- a/test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/BUILD.gn +++ b/test/fuzztest/group_auth/authdevice_fuzzer/BUILD.gn @@ -17,13 +17,15 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_auth" ##############################fuzztest########################################## ohos_fuzztest("AuthDeviceFuzzTest") { module_out_path = module_output_path + fuzz_config_file = + "//base/security/deviceauth/test/fuzztest/group_auth/authdevice_fuzzer" include_dirs = inc_path - sources = [ "authDevice_fuzzer.cpp" ] + sources = [ "authdevice_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/authDevice_fuzzer.cpp b/test/fuzztest/group_auth/authdevice_fuzzer/authdevice_fuzzer.cpp similarity index 98% rename from test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/authDevice_fuzzer.cpp rename to test/fuzztest/group_auth/authdevice_fuzzer/authdevice_fuzzer.cpp index 7567ba5..20b8a9d 100644 --- a/test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/authDevice_fuzzer.cpp +++ b/test/fuzztest/group_auth/authdevice_fuzzer/authdevice_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "authDevice_fuzzer.h" +#include "authdevice_fuzzer.h" namespace OHOS { void OnError(int64_t requestId, int operationCode, int errorCode, const char *errorReturn) {} diff --git a/test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/authDevice_fuzzer.h b/test/fuzztest/group_auth/authdevice_fuzzer/authdevice_fuzzer.h similarity index 94% rename from test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/authDevice_fuzzer.h rename to test/fuzztest/group_auth/authdevice_fuzzer/authdevice_fuzzer.h index b477637..5bcef44 100644 --- a/test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/authDevice_fuzzer.h +++ b/test/fuzztest/group_auth/authdevice_fuzzer/authdevice_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "authDevice_fuzzer" +#define FUZZ_PROJECT_NAME "authdevice_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_auth/authdevice_fuzzer/corpus/init b/test/fuzztest/group_auth/authdevice_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_auth/authdevice_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/project.xml b/test/fuzztest/group_auth/authdevice_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_auth_fuzz_test/authDevice_fuzzer/project.xml rename to test/fuzztest/group_auth/authdevice_fuzzer/project.xml diff --git a/test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/BUILD.gn b/test/fuzztest/group_auth/processauthdata_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/BUILD.gn rename to test/fuzztest/group_auth/processauthdata_fuzzer/BUILD.gn index d17308d..99911b0 100644 --- a/test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/BUILD.gn +++ b/test/fuzztest/group_auth/processauthdata_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_auth" ##############################fuzztest########################################## ohos_fuzztest("ProcessAuthDataFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_auth/processauthdata_fuzzer" include_dirs = inc_path - sources = [ "processData_fuzzer.cpp" ] + sources = [ "processauthdata_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_auth/processauthdata_fuzzer/corpus/init b/test/fuzztest/group_auth/processauthdata_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_auth/processauthdata_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/processData_fuzzer.cpp b/test/fuzztest/group_auth/processauthdata_fuzzer/processauthdata_fuzzer.cpp similarity index 98% rename from test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/processData_fuzzer.cpp rename to test/fuzztest/group_auth/processauthdata_fuzzer/processauthdata_fuzzer.cpp index 18c21eb..96b8cc3 100644 --- a/test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/processData_fuzzer.cpp +++ b/test/fuzztest/group_auth/processauthdata_fuzzer/processauthdata_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "processData_fuzzer.h" +#include "processauthdata_fuzzer.h" namespace OHOS { void OnError(int64_t requestId, int operationCode, int errorCode, const char *errorReturn) {} diff --git a/test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/processData_fuzzer.h b/test/fuzztest/group_auth/processauthdata_fuzzer/processauthdata_fuzzer.h similarity index 93% rename from test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/processData_fuzzer.h rename to test/fuzztest/group_auth/processauthdata_fuzzer/processauthdata_fuzzer.h index 6146d77..0f51571 100644 --- a/test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/processData_fuzzer.h +++ b/test/fuzztest/group_auth/processauthdata_fuzzer/processauthdata_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "ga_processData_fuzzer" +#define FUZZ_PROJECT_NAME "processauthdata_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/project.xml b/test/fuzztest/group_auth/processauthdata_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_auth_fuzz_test/ga_processData_fuzzer/project.xml rename to test/fuzztest/group_auth/processauthdata_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/BUILD.gn b/test/fuzztest/group_manage/addmember_fuzzer/BUILD.gn similarity index 84% rename from test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/addmember_fuzzer/BUILD.gn index 19d322a..0525534 100644 --- a/test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/addmember_fuzzer/BUILD.gn @@ -17,13 +17,15 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## -ohos_fuzztest("AddMemberToGroupFuzzTest") { +ohos_fuzztest("AddMemberFuzzTest") { module_out_path = module_output_path + fuzz_config_file = + "//base/security/deviceauth/test/fuzztest/group_manage/addmember_fuzzer" include_dirs = inc_path - sources = [ "addMemberToGroup_fuzzer.cpp" ] + sources = [ "addmember_fuzzer.cpp" ] cflags = [ "-g", "-O0", @@ -44,7 +46,7 @@ group("fuzztest") { deps = [] deps += [ # deps file - ":AddMemberToGroupFuzzTest", + ":AddMemberFuzzTest", ] } ############################################################################### diff --git a/test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/addMemberToGroup_fuzzer.cpp b/test/fuzztest/group_manage/addmember_fuzzer/addmember_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/addMemberToGroup_fuzzer.cpp rename to test/fuzztest/group_manage/addmember_fuzzer/addmember_fuzzer.cpp index a8db1f1..37d2e47 100644 --- a/test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/addMemberToGroup_fuzzer.cpp +++ b/test/fuzztest/group_manage/addmember_fuzzer/addmember_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "addMemberToGroup_fuzzer.h" +#include "addmember_fuzzer.h" namespace OHOS { bool FuzzDoAddMemberToGroup(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/addMemberToGroup_fuzzer.h b/test/fuzztest/group_manage/addmember_fuzzer/addmember_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/addMemberToGroup_fuzzer.h rename to test/fuzztest/group_manage/addmember_fuzzer/addmember_fuzzer.h index 8da5011..360ed98 100644 --- a/test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/addMemberToGroup_fuzzer.h +++ b/test/fuzztest/group_manage/addmember_fuzzer/addmember_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "addMemberToGroup_fuzzer" +#define FUZZ_PROJECT_NAME "addmember_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manage/addmember_fuzzer/corpus/init b/test/fuzztest/group_manage/addmember_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/addmember_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/project.xml b/test/fuzztest/group_manage/addmember_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/addMemberToGroup_fuzzer/project.xml rename to test/fuzztest/group_manage/addmember_fuzzer/project.xml diff --git a/test/fuzztest/group_manage/checkaccess_fuzzer/BUILD.gn b/test/fuzztest/group_manage/checkaccess_fuzzer/BUILD.gn new file mode 100644 index 0000000..f608428 --- /dev/null +++ b/test/fuzztest/group_manage/checkaccess_fuzzer/BUILD.gn @@ -0,0 +1,52 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//base/security/deviceauth/services/deviceauth.gni") + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +module_output_path = "deviceauth_standard/group_manage" + +##############################fuzztest########################################## +ohos_fuzztest("CheckAccessFuzzTest") { + module_out_path = module_output_path + fuzz_config_file = + "//base/security/deviceauth/test/fuzztest/group_manage/checkaccess_fuzzer" + include_dirs = inc_path + sources = [ "checkaccess_fuzzer.cpp" ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + "-DHILOG_ENABLE", + ] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + + deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":CheckAccessFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/checkAccessToGroup_fuzzer.cpp b/test/fuzztest/group_manage/checkaccess_fuzzer/checkaccess_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/checkAccessToGroup_fuzzer.cpp rename to test/fuzztest/group_manage/checkaccess_fuzzer/checkaccess_fuzzer.cpp index 19b4e62..660642b 100644 --- a/test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/checkAccessToGroup_fuzzer.cpp +++ b/test/fuzztest/group_manage/checkaccess_fuzzer/checkaccess_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "checkAccessToGroup_fuzzer.h" +#include "checkaccess_fuzzer.h" namespace OHOS { bool FuzzDoCheckAccessToGroup(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/checkAccessToGroup_fuzzer.h b/test/fuzztest/group_manage/checkaccess_fuzzer/checkaccess_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/checkAccessToGroup_fuzzer.h rename to test/fuzztest/group_manage/checkaccess_fuzzer/checkaccess_fuzzer.h index 10d2e12..d75cf11 100644 --- a/test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/checkAccessToGroup_fuzzer.h +++ b/test/fuzztest/group_manage/checkaccess_fuzzer/checkaccess_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "checkAccessToGroup_fuzzer" +#define FUZZ_PROJECT_NAME "checkaccess_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manage/checkaccess_fuzzer/corpus/init b/test/fuzztest/group_manage/checkaccess_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/checkaccess_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/project.xml b/test/fuzztest/group_manage/checkaccess_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/project.xml rename to test/fuzztest/group_manage/checkaccess_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/BUILD.gn b/test/fuzztest/group_manage/creategroup_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/creategroup_fuzzer/BUILD.gn index 8d7933b..ead7fc6 100644 --- a/test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/creategroup_fuzzer/BUILD.gn @@ -17,13 +17,15 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("CreateGroupFuzzTest") { module_out_path = module_output_path + fuzz_config_file = + "//base/security/deviceauth/test/fuzztest/group_manage/creategroup_fuzzer" include_dirs = inc_path - sources = [ "createGroup_fuzzer.cpp" ] + sources = [ "creategroup_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/creategroup_fuzzer/corpus/init b/test/fuzztest/group_manage/creategroup_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/creategroup_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/createGroup_fuzzer.cpp b/test/fuzztest/group_manage/creategroup_fuzzer/creategroup_fuzzer.cpp similarity index 98% rename from test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/createGroup_fuzzer.cpp rename to test/fuzztest/group_manage/creategroup_fuzzer/creategroup_fuzzer.cpp index 0778f5c..6832f00 100644 --- a/test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/createGroup_fuzzer.cpp +++ b/test/fuzztest/group_manage/creategroup_fuzzer/creategroup_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "createGroup_fuzzer.h" +#include "creategroup_fuzzer.h" namespace OHOS { bool FuzzDoCreateGroup(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/createGroup_fuzzer.h b/test/fuzztest/group_manage/creategroup_fuzzer/creategroup_fuzzer.h similarity index 94% rename from test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/createGroup_fuzzer.h rename to test/fuzztest/group_manage/creategroup_fuzzer/creategroup_fuzzer.h index 7306e45..24da580 100644 --- a/test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/createGroup_fuzzer.h +++ b/test/fuzztest/group_manage/creategroup_fuzzer/creategroup_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "createGroup_fuzzer" +#define FUZZ_PROJECT_NAME "creategroup_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/project.xml b/test/fuzztest/group_manage/creategroup_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/createGroup_fuzzer/project.xml rename to test/fuzztest/group_manage/creategroup_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/BUILD.gn b/test/fuzztest/group_manage/deletegroup_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/deletegroup_fuzzer/BUILD.gn index b3caef0..1bbdf22 100644 --- a/test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/deletegroup_fuzzer/BUILD.gn @@ -17,13 +17,15 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("DeleteGroupFuzzTest") { module_out_path = module_output_path + fuzz_config_file = + "//base/security/deviceauth/test/fuzztest/group_manage/deletegroup_fuzzer" include_dirs = inc_path - sources = [ "deleteGroup_fuzzer.cpp" ] + sources = [ "deletegroup_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/deletegroup_fuzzer/corpus/init b/test/fuzztest/group_manage/deletegroup_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/deletegroup_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/deleteGroup_fuzzer.cpp b/test/fuzztest/group_manage/deletegroup_fuzzer/deletegroup_fuzzer.cpp similarity index 98% rename from test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/deleteGroup_fuzzer.cpp rename to test/fuzztest/group_manage/deletegroup_fuzzer/deletegroup_fuzzer.cpp index 8a68244..51b6e70 100644 --- a/test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/deleteGroup_fuzzer.cpp +++ b/test/fuzztest/group_manage/deletegroup_fuzzer/deletegroup_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "deleteGroup_fuzzer.h" +#include "deletegroup_fuzzer.h" namespace OHOS { bool FuzzDoDeleteGroup(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/deleteGroup_fuzzer.h b/test/fuzztest/group_manage/deletegroup_fuzzer/deletegroup_fuzzer.h similarity index 94% rename from test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/deleteGroup_fuzzer.h rename to test/fuzztest/group_manage/deletegroup_fuzzer/deletegroup_fuzzer.h index adb6e08..2e6a8df 100644 --- a/test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/deleteGroup_fuzzer.h +++ b/test/fuzztest/group_manage/deletegroup_fuzzer/deletegroup_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "deleteGroup_fuzzer" +#define FUZZ_PROJECT_NAME "deletegroup_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/project.xml b/test/fuzztest/group_manage/deletegroup_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/deleteGroup_fuzzer/project.xml rename to test/fuzztest/group_manage/deletegroup_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/BUILD.gn b/test/fuzztest/group_manage/deletemember_fuzzer/BUILD.gn similarity index 84% rename from test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/deletemember_fuzzer/BUILD.gn index 6632c46..a5094b1 100644 --- a/test/fuzztest/group_manager_fuzz_test/checkAccessToGroup_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/deletemember_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## -ohos_fuzztest("CheckAccessToGroupFuzzTest") { +ohos_fuzztest("DeleteMemberFuzzTest") { module_out_path = module_output_path include_dirs = inc_path - sources = [ "checkAccessToGroup_fuzzer.cpp" ] + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/deletemember_fuzzer" + sources = [ "deletemember_fuzzer.cpp" ] cflags = [ "-g", "-O0", @@ -44,7 +45,7 @@ group("fuzztest") { deps = [] deps += [ # deps file - ":CheckAccessToGroupFuzzTest", + ":DeleteMemberFuzzTest", ] } ############################################################################### diff --git a/test/fuzztest/group_manage/deletemember_fuzzer/corpus/init b/test/fuzztest/group_manage/deletemember_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/deletemember_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/deleteMemberFromGroup_fuzzer.cpp b/test/fuzztest/group_manage/deletemember_fuzzer/deletemember_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/deleteMemberFromGroup_fuzzer.cpp rename to test/fuzztest/group_manage/deletemember_fuzzer/deletemember_fuzzer.cpp index dfdecba..a641c4d 100644 --- a/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/deleteMemberFromGroup_fuzzer.cpp +++ b/test/fuzztest/group_manage/deletemember_fuzzer/deletemember_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "deleteMemberFromGroup_fuzzer.h" +#include "deletemember_fuzzer.h" namespace OHOS { bool FuzzDoDeleteMember(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/deleteMemberFromGroup_fuzzer.h b/test/fuzztest/group_manage/deletemember_fuzzer/deletemember_fuzzer.h similarity index 92% rename from test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/deleteMemberFromGroup_fuzzer.h rename to test/fuzztest/group_manage/deletemember_fuzzer/deletemember_fuzzer.h index b633b44..becb0f4 100644 --- a/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/deleteMemberFromGroup_fuzzer.h +++ b/test/fuzztest/group_manage/deletemember_fuzzer/deletemember_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "deleteMemberFromGroup_fuzzer" +#define FUZZ_PROJECT_NAME "deletemember_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/project.xml b/test/fuzztest/group_manage/deletemember_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/project.xml rename to test/fuzztest/group_manage/deletemember_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/BUILD.gn b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/BUILD.gn index 5949bbc..ef24f7a 100644 --- a/test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetDeviceInfoByIdFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer" include_dirs = inc_path - sources = [ "getDeviceInfoById_fuzzer.cpp" ] + sources = [ "getdeviceinfobyid_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/corpus/init b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/getDeviceInfoById_fuzzer.cpp b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/getdeviceinfobyid_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/getDeviceInfoById_fuzzer.cpp rename to test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/getdeviceinfobyid_fuzzer.cpp index 98befc3..d6d3368 100644 --- a/test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/getDeviceInfoById_fuzzer.cpp +++ b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/getdeviceinfobyid_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getDeviceInfoById_fuzzer.h" +#include "getdeviceinfobyid_fuzzer.h" namespace OHOS { bool FuzzDoGetDeviceInfoById(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/getDeviceInfoById_fuzzer.h b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/getdeviceinfobyid_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/getDeviceInfoById_fuzzer.h rename to test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/getdeviceinfobyid_fuzzer.h index 917db48..cd34fe7 100644 --- a/test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/getDeviceInfoById_fuzzer.h +++ b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/getdeviceinfobyid_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getDeviceInfoById_fuzzer" +#define FUZZ_PROJECT_NAME "getdeviceinfobyid_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/project.xml b/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getDeviceInfoById_fuzzer/project.xml rename to test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/BUILD.gn b/test/fuzztest/group_manage/getgroupinfo_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/getgroupinfo_fuzzer/BUILD.gn index 214157c..38c1c20 100644 --- a/test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/getgroupinfo_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetGroupInfoFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/getgroupinfo_fuzzer" include_dirs = inc_path - sources = [ "getGroupInfo_fuzzer.cpp" ] + sources = [ "getgroupinfo_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/getgroupinfo_fuzzer/corpus/init b/test/fuzztest/group_manage/getgroupinfo_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/getgroupinfo_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/getGroupInfo_fuzzer.cpp b/test/fuzztest/group_manage/getgroupinfo_fuzzer/getgroupinfo_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/getGroupInfo_fuzzer.cpp rename to test/fuzztest/group_manage/getgroupinfo_fuzzer/getgroupinfo_fuzzer.cpp index 9f398dc..16e4a86 100644 --- a/test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/getGroupInfo_fuzzer.cpp +++ b/test/fuzztest/group_manage/getgroupinfo_fuzzer/getgroupinfo_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getGroupInfo_fuzzer.h" +#include "getgroupinfo_fuzzer.h" namespace OHOS { bool FuzzDoGetGroupInfo(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/getGroupInfo_fuzzer.h b/test/fuzztest/group_manage/getgroupinfo_fuzzer/getgroupinfo_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/getGroupInfo_fuzzer.h rename to test/fuzztest/group_manage/getgroupinfo_fuzzer/getgroupinfo_fuzzer.h index c4d3dc3..b94f84a 100644 --- a/test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/getGroupInfo_fuzzer.h +++ b/test/fuzztest/group_manage/getgroupinfo_fuzzer/getgroupinfo_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getGroupInfo_fuzzer" +#define FUZZ_PROJECT_NAME "getgroupinfo_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/project.xml b/test/fuzztest/group_manage/getgroupinfo_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/project.xml rename to test/fuzztest/group_manage/getgroupinfo_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/BUILD.gn b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/getgroupinfobyid_fuzzer/BUILD.gn index 5810d2d..a1bbb80 100644 --- a/test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetGroupInfoByIdFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/getgroupinfobyid_fuzzer" include_dirs = inc_path - sources = [ "getGroupInfoById_fuzzer.cpp" ] + sources = [ "getgroupinfobyid_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/corpus/init b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/getGroupInfoById_fuzzer.cpp b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/getgroupinfobyid_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/getGroupInfoById_fuzzer.cpp rename to test/fuzztest/group_manage/getgroupinfobyid_fuzzer/getgroupinfobyid_fuzzer.cpp index b187183..62a7938 100644 --- a/test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/getGroupInfoById_fuzzer.cpp +++ b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/getgroupinfobyid_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getGroupInfoById_fuzzer.h" +#include "getgroupinfobyid_fuzzer.h" namespace OHOS { bool FuzzDoGetGroupInfoById(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/getGroupInfoById_fuzzer.h b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/getgroupinfobyid_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/getGroupInfoById_fuzzer.h rename to test/fuzztest/group_manage/getgroupinfobyid_fuzzer/getgroupinfobyid_fuzzer.h index e6ffe1b..1238763 100644 --- a/test/fuzztest/group_manager_fuzz_test/getGroupInfoById_fuzzer/getGroupInfoById_fuzzer.h +++ b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/getgroupinfobyid_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getGroupInfoById_fuzzer" +#define FUZZ_PROJECT_NAME "getgroupinfobyid_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/project.xml b/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getGroupInfo_fuzzer/project.xml rename to test/fuzztest/group_manage/getgroupinfobyid_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/BUILD.gn b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/getjoinedgroups_fuzzer/BUILD.gn index 328f0c9..b9def92 100644 --- a/test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetJoinedGroupsFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/getjoinedgroups_fuzzer" include_dirs = inc_path - sources = [ "getJoinedGroups_fuzzer.cpp" ] + sources = [ "getjoinedgroups_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/getjoinedgroups_fuzzer/corpus/init b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/getJoinedGroups_fuzzer.cpp b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/getjoinedgroups_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/getJoinedGroups_fuzzer.cpp rename to test/fuzztest/group_manage/getjoinedgroups_fuzzer/getjoinedgroups_fuzzer.cpp index 4659e00..d5d289f 100644 --- a/test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/getJoinedGroups_fuzzer.cpp +++ b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/getjoinedgroups_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getJoinedGroups_fuzzer.h" +#include "getjoinedgroups_fuzzer.h" namespace OHOS { bool FuzzDoGetJoinedGroups(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/getJoinedGroups_fuzzer.h b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/getjoinedgroups_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/getJoinedGroups_fuzzer.h rename to test/fuzztest/group_manage/getjoinedgroups_fuzzer/getjoinedgroups_fuzzer.h index 2b2cb34..812d844 100644 --- a/test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/getJoinedGroups_fuzzer.h +++ b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/getjoinedgroups_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getJoinedGroups_fuzzer" +#define FUZZ_PROJECT_NAME "getjoinedgroups_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/project.xml b/test/fuzztest/group_manage/getjoinedgroups_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getJoinedGroups_fuzzer/project.xml rename to test/fuzztest/group_manage/getjoinedgroups_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/BUILD.gn b/test/fuzztest/group_manage/getpkinfolist_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/getpkinfolist_fuzzer/BUILD.gn index e28718c..b95fd54 100644 --- a/test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/getpkinfolist_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetPkgInfoListFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/getpkinfolist_fuzzer" include_dirs = inc_path - sources = [ "getPkInfoList_fuzzer.cpp" ] + sources = [ "getpkinfolist_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/getpkinfolist_fuzzer/corpus/init b/test/fuzztest/group_manage/getpkinfolist_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/getpkinfolist_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/getPkInfoList_fuzzer.cpp b/test/fuzztest/group_manage/getpkinfolist_fuzzer/getpkinfolist_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/getPkInfoList_fuzzer.cpp rename to test/fuzztest/group_manage/getpkinfolist_fuzzer/getpkinfolist_fuzzer.cpp index 4a02135..a246c68 100644 --- a/test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/getPkInfoList_fuzzer.cpp +++ b/test/fuzztest/group_manage/getpkinfolist_fuzzer/getpkinfolist_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getPkInfoList_fuzzer.h" +#include "getpkinfolist_fuzzer.h" namespace OHOS { bool FuzzDoGetPkgInfoList(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/getPkInfoList_fuzzer.h b/test/fuzztest/group_manage/getpkinfolist_fuzzer/getpkinfolist_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/getPkInfoList_fuzzer.h rename to test/fuzztest/group_manage/getpkinfolist_fuzzer/getpkinfolist_fuzzer.h index 1662914..3ab7bd5 100644 --- a/test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/getPkInfoList_fuzzer.h +++ b/test/fuzztest/group_manage/getpkinfolist_fuzzer/getpkinfolist_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getPkInfoList_fuzzer" +#define FUZZ_PROJECT_NAME "getpkinfolist_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/project.xml b/test/fuzztest/group_manage/getpkinfolist_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getPkInfoList_fuzzer/project.xml rename to test/fuzztest/group_manage/getpkinfolist_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/BUILD.gn b/test/fuzztest/group_manage/getregisterinfo_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/getregisterinfo_fuzzer/BUILD.gn index 97519d8..c9d400b 100644 --- a/test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/getregisterinfo_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetRegisterInfoFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/getregisterinfo_fuzzer" include_dirs = inc_path - sources = [ "getRegisterInfo_fuzzer.cpp" ] + sources = [ "getregisterinfo_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/getregisterinfo_fuzzer/corpus/init b/test/fuzztest/group_manage/getregisterinfo_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/getregisterinfo_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/getRegisterInfo_fuzzer.cpp b/test/fuzztest/group_manage/getregisterinfo_fuzzer/getregisterinfo_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/getRegisterInfo_fuzzer.cpp rename to test/fuzztest/group_manage/getregisterinfo_fuzzer/getregisterinfo_fuzzer.cpp index 3c01683..5311f5a 100644 --- a/test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/getRegisterInfo_fuzzer.cpp +++ b/test/fuzztest/group_manage/getregisterinfo_fuzzer/getregisterinfo_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getRegisterInfo_fuzzer.h" +#include "getregisterinfo_fuzzer.h" namespace OHOS { bool FuzzDoGetRegisterInfo(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/getRegisterInfo_fuzzer.h b/test/fuzztest/group_manage/getregisterinfo_fuzzer/getregisterinfo_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/getRegisterInfo_fuzzer.h rename to test/fuzztest/group_manage/getregisterinfo_fuzzer/getregisterinfo_fuzzer.h index e7a6700..d643413 100644 --- a/test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/getRegisterInfo_fuzzer.h +++ b/test/fuzztest/group_manage/getregisterinfo_fuzzer/getregisterinfo_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getRegisterInfo_fuzzer" +#define FUZZ_PROJECT_NAME "getregisterinfo_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/project.xml b/test/fuzztest/group_manage/getregisterinfo_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getRegisterInfo_fuzzer/project.xml rename to test/fuzztest/group_manage/getregisterinfo_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/BUILD.gn b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/getrelatedgroups_fuzzer/BUILD.gn index 2ce54bf..eeafbe1 100644 --- a/test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetRelatedGroupsFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/getrelatedgroups_fuzzer" include_dirs = inc_path - sources = [ "getRelatedGroups_fuzzer.cpp" ] + sources = [ "getrelatedgroups_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/getrelatedgroups_fuzzer/corpus/init b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/getRelatedGroups_fuzzer.cpp b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/getrelatedgroups_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/getRelatedGroups_fuzzer.cpp rename to test/fuzztest/group_manage/getrelatedgroups_fuzzer/getrelatedgroups_fuzzer.cpp index 3790ea1..3e9796c 100644 --- a/test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/getRelatedGroups_fuzzer.cpp +++ b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/getrelatedgroups_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getRelatedGroups_fuzzer.h" +#include "getrelatedgroups_fuzzer.h" namespace OHOS { bool FuzzDoGetRelatedGroups(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/getRelatedGroups_fuzzer.h b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/getrelatedgroups_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/getRelatedGroups_fuzzer.h rename to test/fuzztest/group_manage/getrelatedgroups_fuzzer/getrelatedgroups_fuzzer.h index 3f0dcab..fd2f6c0 100644 --- a/test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/getRelatedGroups_fuzzer.h +++ b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/getrelatedgroups_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getRelatedGroups_fuzzer" +#define FUZZ_PROJECT_NAME "getrelatedgroups_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/project.xml b/test/fuzztest/group_manage/getrelatedgroups_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getRelatedGroups_fuzzer/project.xml rename to test/fuzztest/group_manage/getrelatedgroups_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/BUILD.gn b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/gettrusteddevices_fuzzer/BUILD.gn index 50c4067..41e5e5e 100644 --- a/test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("GetTrustedDevicesFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/gettrusteddevices_fuzzer" include_dirs = inc_path - sources = [ "getTrustedDevices_fuzzer.cpp" ] + sources = [ "gettrusteddevices_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/gettrusteddevices_fuzzer/corpus/init b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/getTrustedDevices_fuzzer.cpp b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/gettrusteddevices_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/getTrustedDevices_fuzzer.cpp rename to test/fuzztest/group_manage/gettrusteddevices_fuzzer/gettrusteddevices_fuzzer.cpp index 025d5e0..dba3853 100644 --- a/test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/getTrustedDevices_fuzzer.cpp +++ b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/gettrusteddevices_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "getTrustedDevices_fuzzer.h" +#include "gettrusteddevices_fuzzer.h" namespace OHOS { bool FuzzDoGetTrustedDevices(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/getTrustedDevices_fuzzer.h b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/gettrusteddevices_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/getTrustedDevices_fuzzer.h rename to test/fuzztest/group_manage/gettrusteddevices_fuzzer/gettrusteddevices_fuzzer.h index b222c4d..a9f8eb1 100644 --- a/test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/getTrustedDevices_fuzzer.h +++ b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/gettrusteddevices_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "getTrustedDevices_fuzzer" +#define FUZZ_PROJECT_NAME "gettrusteddevices_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/project.xml b/test/fuzztest/group_manage/gettrusteddevices_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/getTrustedDevices_fuzzer/project.xml rename to test/fuzztest/group_manage/gettrusteddevices_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/BUILD.gn b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/isdeviceingroup_fuzzer/BUILD.gn index ed0f8da..0065cb3 100644 --- a/test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("IsDeviceInGroupFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/isdeviceingroup_fuzzer" include_dirs = inc_path - sources = [ "isDeviceInGroup_fuzzer.cpp" ] + sources = [ "isdeviceingroup_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/isdeviceingroup_fuzzer/corpus/init b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/isDeviceInGroup_fuzzer.cpp b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/isdeviceingroup_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/isDeviceInGroup_fuzzer.cpp rename to test/fuzztest/group_manage/isdeviceingroup_fuzzer/isdeviceingroup_fuzzer.cpp index 4cda1f9..7108517 100644 --- a/test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/isDeviceInGroup_fuzzer.cpp +++ b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/isdeviceingroup_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "isDeviceInGroup_fuzzer.h" +#include "isdeviceingroup_fuzzer.h" namespace OHOS { bool FuzzDoIsDeviceInGroup(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/isDeviceInGroup_fuzzer.h b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/isdeviceingroup_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/isDeviceInGroup_fuzzer.h rename to test/fuzztest/group_manage/isdeviceingroup_fuzzer/isdeviceingroup_fuzzer.h index d603127..86ad78a 100644 --- a/test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/isDeviceInGroup_fuzzer.h +++ b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/isdeviceingroup_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "isDeviceInGroup_fuzzer" +#define FUZZ_PROJECT_NAME "isdeviceingroup_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/project.xml b/test/fuzztest/group_manage/isdeviceingroup_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/project.xml rename to test/fuzztest/group_manage/isdeviceingroup_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/BUILD.gn b/test/fuzztest/group_manage/processbinddata_fuzzer/BUILD.gn similarity index 88% rename from test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/BUILD.gn rename to test/fuzztest/group_manage/processbinddata_fuzzer/BUILD.gn index bbe2e9f..56d6ec0 100644 --- a/test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/BUILD.gn +++ b/test/fuzztest/group_manage/processbinddata_fuzzer/BUILD.gn @@ -17,13 +17,14 @@ import("//base/security/deviceauth/services/deviceauth.gni") import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" +module_output_path = "deviceauth_standard/group_manage" ##############################fuzztest########################################## ohos_fuzztest("ProcessBindDataFuzzTest") { module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/processbinddata_fuzzer" include_dirs = inc_path - sources = [ "processData_fuzzer.cpp" ] + sources = [ "processbinddata_fuzzer.cpp" ] cflags = [ "-g", "-O0", diff --git a/test/fuzztest/group_manage/processbinddata_fuzzer/corpus/init b/test/fuzztest/group_manage/processbinddata_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/processbinddata_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/processData_fuzzer.cpp b/test/fuzztest/group_manage/processbinddata_fuzzer/processbinddata_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/processData_fuzzer.cpp rename to test/fuzztest/group_manage/processbinddata_fuzzer/processbinddata_fuzzer.cpp index 765a8fa..706e2e3 100644 --- a/test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/processData_fuzzer.cpp +++ b/test/fuzztest/group_manage/processbinddata_fuzzer/processbinddata_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "processData_fuzzer.h" +#include "processbinddata_fuzzer.h" namespace OHOS { bool FuzzDoProcessData(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/processData_fuzzer.h b/test/fuzztest/group_manage/processbinddata_fuzzer/processbinddata_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/processData_fuzzer.h rename to test/fuzztest/group_manage/processbinddata_fuzzer/processbinddata_fuzzer.h index cf50a60..554491d 100644 --- a/test/fuzztest/group_manager_fuzz_test/gm_processData_fuzzer/processData_fuzzer.h +++ b/test/fuzztest/group_manage/processbinddata_fuzzer/processbinddata_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "gm_processData_fuzzer" +#define FUZZ_PROJECT_NAME "processbinddata_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/project.xml b/test/fuzztest/group_manage/processbinddata_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/isDeviceInGroup_fuzzer/project.xml rename to test/fuzztest/group_manage/processbinddata_fuzzer/project.xml diff --git a/test/fuzztest/group_manage/registercallback_fuzzer/BUILD.gn b/test/fuzztest/group_manage/registercallback_fuzzer/BUILD.gn new file mode 100644 index 0000000..d0c1157 --- /dev/null +++ b/test/fuzztest/group_manage/registercallback_fuzzer/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//base/security/deviceauth/services/deviceauth.gni") + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +module_output_path = "deviceauth_standard/group_manage" + +##############################fuzztest########################################## +ohos_fuzztest("RegisterCallbackFuzzTest") { + module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/registercallback_fuzzer" + include_dirs = inc_path + sources = [ "registercallback_fuzzer.cpp" ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + "-DHILOG_ENABLE", + ] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + + deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":RegisterCallbackFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/group_manage/registercallback_fuzzer/corpus/init b/test/fuzztest/group_manage/registercallback_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/registercallback_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/project.xml b/test/fuzztest/group_manage/registercallback_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/project.xml rename to test/fuzztest/group_manage/registercallback_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/regCallback_fuzzer.cpp b/test/fuzztest/group_manage/registercallback_fuzzer/registercallback_fuzzer.cpp similarity index 98% rename from test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/regCallback_fuzzer.cpp rename to test/fuzztest/group_manage/registercallback_fuzzer/registercallback_fuzzer.cpp index 91b9e2b..b8ba715 100644 --- a/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/regCallback_fuzzer.cpp +++ b/test/fuzztest/group_manage/registercallback_fuzzer/registercallback_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "regCallback_fuzzer.h" +#include "registercallback_fuzzer.h" namespace OHOS { void OnError(int64_t requestId, int operationCode, int errorCode, const char *errorReturn) {} diff --git a/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/regCallback_fuzzer.h b/test/fuzztest/group_manage/registercallback_fuzzer/registercallback_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/regCallback_fuzzer.h rename to test/fuzztest/group_manage/registercallback_fuzzer/registercallback_fuzzer.h index 709fe0b..10e1189 100644 --- a/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/regCallback_fuzzer.h +++ b/test/fuzztest/group_manage/registercallback_fuzzer/registercallback_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "regCallback_fuzzer" +#define FUZZ_PROJECT_NAME "registercallback_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/BUILD.gn b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/BUILD.gn new file mode 100644 index 0000000..6b9e975 --- /dev/null +++ b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//base/security/deviceauth/services/deviceauth.gni") + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +module_output_path = "deviceauth_standard/group_manage" + +##############################fuzztest########################################## +ohos_fuzztest("RegisterDataChangeListenerFuzzTest") { + module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/registerdatachangelistener_fuzzer" + include_dirs = inc_path + sources = [ "registerdatachangelistener_fuzzer.cpp" ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + "-DHILOG_ENABLE", + ] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + + deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":RegisterDataChangeListenerFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/corpus/init b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/project.xml b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/project.xml rename to test/fuzztest/group_manage/registerdatachangelistener_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/regDataChangeListener_fuzzer.cpp b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/registerdatachangelistener_fuzzer.cpp similarity index 97% rename from test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/regDataChangeListener_fuzzer.cpp rename to test/fuzztest/group_manage/registerdatachangelistener_fuzzer/registerdatachangelistener_fuzzer.cpp index 2ae19cf..b321519 100644 --- a/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/regDataChangeListener_fuzzer.cpp +++ b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/registerdatachangelistener_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "regDataChangeListener_fuzzer.h" +#include "registerdatachangelistener_fuzzer.h" namespace OHOS { void onGroupCreated(const char *groupInfo) {} diff --git a/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/regDataChangeListener_fuzzer.h b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/registerdatachangelistener_fuzzer.h similarity index 92% rename from test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/regDataChangeListener_fuzzer.h rename to test/fuzztest/group_manage/registerdatachangelistener_fuzzer/registerdatachangelistener_fuzzer.h index 4d5203e..a7c4b69 100644 --- a/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/regDataChangeListener_fuzzer.h +++ b/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/registerdatachangelistener_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "regDataChangeListener_fuzzer" +#define FUZZ_PROJECT_NAME "registerdatachangelistener_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manage/unregistercallback_fuzzer/BUILD.gn b/test/fuzztest/group_manage/unregistercallback_fuzzer/BUILD.gn new file mode 100644 index 0000000..a35d102 --- /dev/null +++ b/test/fuzztest/group_manage/unregistercallback_fuzzer/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//base/security/deviceauth/services/deviceauth.gni") + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +module_output_path = "deviceauth_standard/group_manage" + +##############################fuzztest########################################## +ohos_fuzztest("UnregisterCallbackFuzzTest") { + module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/unregistercallback_fuzzer" + include_dirs = inc_path + sources = [ "unregistercallback_fuzzer.cpp" ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + "-DHILOG_ENABLE", + ] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + + deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":UnregisterCallbackFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/group_manage/unregistercallback_fuzzer/corpus/init b/test/fuzztest/group_manage/unregistercallback_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/unregistercallback_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/project.xml b/test/fuzztest/group_manage/unregistercallback_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/project.xml rename to test/fuzztest/group_manage/unregistercallback_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/unRegCallback_fuzzer.cpp b/test/fuzztest/group_manage/unregistercallback_fuzzer/unregistercallback_fuzzer.cpp similarity index 96% rename from test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/unRegCallback_fuzzer.cpp rename to test/fuzztest/group_manage/unregistercallback_fuzzer/unregistercallback_fuzzer.cpp index f665706..6c7c30b 100644 --- a/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/unRegCallback_fuzzer.cpp +++ b/test/fuzztest/group_manage/unregistercallback_fuzzer/unregistercallback_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "unRegCallback_fuzzer.h" +#include "unregistercallback_fuzzer.h" namespace OHOS { bool FuzzDoUnregisterCallback(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/unRegCallback_fuzzer.h b/test/fuzztest/group_manage/unregistercallback_fuzzer/unregistercallback_fuzzer.h similarity index 93% rename from test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/unRegCallback_fuzzer.h rename to test/fuzztest/group_manage/unregistercallback_fuzzer/unregistercallback_fuzzer.h index bd23162..6f1bf42 100644 --- a/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/unRegCallback_fuzzer.h +++ b/test/fuzztest/group_manage/unregistercallback_fuzzer/unregistercallback_fuzzer.h @@ -21,5 +21,5 @@ #include #include -#define FUZZ_PROJECT_NAME "unRegCallback_fuzzer" +#define FUZZ_PROJECT_NAME "unregistercallback_fuzzer" #endif \ No newline at end of file diff --git a/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/BUILD.gn b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/BUILD.gn new file mode 100644 index 0000000..0cf43cc --- /dev/null +++ b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//base/security/deviceauth/services/deviceauth.gni") + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +module_output_path = "deviceauth_standard/group_manage" + +##############################fuzztest########################################## +ohos_fuzztest("UnregisterDataChangeListenerFuzzTest") { + module_out_path = module_output_path + fuzz_config_file = "//base/security/deviceauth/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer" + include_dirs = inc_path + sources = [ "unregisterdatachangelistener_fuzzer.cpp" ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + "-DHILOG_ENABLE", + ] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + + deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":UnregisterDataChangeListenerFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/corpus/init b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/corpus/init new file mode 100644 index 0000000..8eb5a7d --- /dev/null +++ b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/project.xml b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/project.xml similarity index 100% rename from test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/project.xml rename to test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/project.xml diff --git a/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/unRegDataChangeListener_fuzzer.cpp b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/unregisterdatachangelistener_fuzzer.cpp similarity index 96% rename from test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/unRegDataChangeListener_fuzzer.cpp rename to test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/unregisterdatachangelistener_fuzzer.cpp index 6122f11..b99b45e 100644 --- a/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/unRegDataChangeListener_fuzzer.cpp +++ b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/unregisterdatachangelistener_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "unRegDataChangeListener_fuzzer.h" +#include "unregisterdatachangelistener_fuzzer.h" namespace OHOS { bool FuzzDoUnregisterDataChangeListener(const uint8_t* data, size_t size) diff --git a/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/unRegDataChangeListener_fuzzer.h b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/unregisterdatachangelistener_fuzzer.h similarity index 92% rename from test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/unRegDataChangeListener_fuzzer.h rename to test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/unregisterdatachangelistener_fuzzer.h index d1ed6a2..5fe10ab 100644 --- a/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/unRegDataChangeListener_fuzzer.h +++ b/test/fuzztest/group_manage/unregisterdatachangelistener_fuzzer/unregisterdatachangelistener_fuzzer.h @@ -21,6 +21,6 @@ #include #include -#define FUZZ_PROJECT_NAME "unRegDataChangeListener_fuzzer" +#define FUZZ_PROJECT_NAME "unregisterdatachangelistener_fuzzer" #endif diff --git a/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/BUILD.gn b/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/BUILD.gn deleted file mode 100644 index 26a0c2a..0000000 --- a/test/fuzztest/group_manager_fuzz_test/deleteMemberFromGroup_fuzzer/BUILD.gn +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//base/security/deviceauth/services/deviceauth.gni") - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" - -##############################fuzztest########################################## -ohos_fuzztest("DeleteMemberFromGroupFuzzTest") { - module_out_path = module_output_path - include_dirs = inc_path - sources = [ "deleteMemberFromGroup_fuzzer.cpp" ] - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - "-DHILOG_ENABLE", - ] - if (target_cpu == "arm") { - cflags += [ "-DBINDER_IPC_32BIT" ] - } - - deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [] - deps += [ - # deps file - ":DeleteMemberFromGroupFuzzTest", - ] -} -############################################################################### diff --git a/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/BUILD.gn b/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/BUILD.gn deleted file mode 100644 index b20f49a..0000000 --- a/test/fuzztest/group_manager_fuzz_test/regCallback_fuzzer/BUILD.gn +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//base/security/deviceauth/services/deviceauth.gni") - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" - -##############################fuzztest########################################## -ohos_fuzztest("RegCallbackFuzzTest") { - module_out_path = module_output_path - include_dirs = inc_path - sources = [ "regCallback_fuzzer.cpp" ] - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - "-DHILOG_ENABLE", - ] - if (target_cpu == "arm") { - cflags += [ "-DBINDER_IPC_32BIT" ] - } - - deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [] - deps += [ - # deps file - ":RegCallbackFuzzTest", - ] -} -############################################################################### diff --git a/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/BUILD.gn b/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/BUILD.gn deleted file mode 100644 index a6c64e8..0000000 --- a/test/fuzztest/group_manager_fuzz_test/regDataChangeListener_fuzzer/BUILD.gn +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//base/security/deviceauth/services/deviceauth.gni") - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" - -##############################fuzztest########################################## -ohos_fuzztest("RegDataChangeListenerFuzzTest") { - module_out_path = module_output_path - include_dirs = inc_path - sources = [ "regDataChangeListener_fuzzer.cpp" ] - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - "-DHILOG_ENABLE", - ] - if (target_cpu == "arm") { - cflags += [ "-DBINDER_IPC_32BIT" ] - } - - deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [] - deps += [ - # deps file - ":RegDataChangeListenerFuzzTest", - ] -} -############################################################################### diff --git a/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/BUILD.gn b/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/BUILD.gn deleted file mode 100644 index 490bf06..0000000 --- a/test/fuzztest/group_manager_fuzz_test/unRegCallback_fuzzer/BUILD.gn +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//base/security/deviceauth/services/deviceauth.gni") - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" - -##############################fuzztest########################################## -ohos_fuzztest("UnregCallbackFuzzTest") { - module_out_path = module_output_path - include_dirs = inc_path - sources = [ "unRegCallback_fuzzer.cpp" ] - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - "-DHILOG_ENABLE", - ] - if (target_cpu == "arm") { - cflags += [ "-DBINDER_IPC_32BIT" ] - } - - deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [] - deps += [ - # deps file - ":UnregCallbackFuzzTest", - ] -} -############################################################################### diff --git a/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/BUILD.gn b/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/BUILD.gn deleted file mode 100644 index 304670c..0000000 --- a/test/fuzztest/group_manager_fuzz_test/unRegDataChangeListener_fuzzer/BUILD.gn +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//base/security/deviceauth/services/deviceauth.gni") - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") -module_output_path = "deviceauth_standard/deviceauth_fuzz_test" - -##############################fuzztest########################################## -ohos_fuzztest("UnregDataChangeListenerFuzzTest") { - module_out_path = module_output_path - include_dirs = inc_path - sources = [ "unRegDataChangeListener_fuzzer.cpp" ] - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - "-DHILOG_ENABLE", - ] - if (target_cpu == "arm") { - cflags += [ "-DBINDER_IPC_32BIT" ] - } - - deps = [ "//base/security/deviceauth/services:deviceauth_sdk" ] -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [] - deps += [ - # deps file - ":UnregDataChangeListenerFuzzTest", - ] -} -###############################################################################