diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index 24fa5ec73702056f063aae0979ab26c7f9775928..1c4fd3c4f567601e4feae5e657def3faaddece0f 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -62,9 +62,6 @@ group("fuzztest") { "ipc/native/src/core/iremotebroker_fuzzer:IRemoteBrokerFuzzTest", "ipc/native/src/core/processskeleton_fuzzer:ProcessSkeletonFuzzTest", "ipc/native/src/mock/acquirehandle_fuzzer:AcquireHandleFuzzTest", - "dbinder/dbinder_service/src/getlocaldeviceid_fuzzer:GetLocalDeviceIDFuzzTest", - "dbinder/dbinder_service/src/getseqnumber_fuzzer:GetSeqNumberFuzzTest", - "dbinder/dbinder_service/src/restartremotelistener_fuzzer:ReStartRemoteListenerFuzzTest", "dbinder/dbinder_service/src/dbinderservicenew_fuzzer:DBinderServiceNewFuzzTest", "dbinder/dbinder_service/src/socket/dbinderremotelistener_fuzzer:DBinderRemoteListenerFuzzTest", ] diff --git a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/BUILD.gn b/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/BUILD.gn deleted file mode 100644 index 476c9d0552a39efa7e87645c631b92d5ba70e453..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/BUILD.gn +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2024-2025 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. - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/test.gni") - -##############################fuzztest########################################## -ohos_fuzztest("GetLocalDeviceIDFuzzTest") { - module_out_path = "ipc/ipc" - fuzz_config_file = "../getlocaldeviceid_fuzzer" - - cflags = [ - "-fno-omit-frame-pointer", - ] - sources = [ "getlocaldeviceid_fuzzer.cpp" ] - - deps = [ "../../../../../../interfaces/innerkits/libdbinder:libdbinder" ] - - defines = [ "private=public" ] - - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - ] -} diff --git a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/corpus/init b/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/corpus/init deleted file mode 100644 index 23c84fa999f51483ed0811ca324b5f51174209d0..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/corpus/init +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2024-2025 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/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/getlocaldeviceid_fuzzer.cpp b/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/getlocaldeviceid_fuzzer.cpp deleted file mode 100644 index 9cd3d3776f49b537292a57d8126e7e8111bb8ed4..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/getlocaldeviceid_fuzzer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2024-2025 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. - */ - -#include "getlocaldeviceid_fuzzer.h" - -#include - -namespace OHOS { - -void GetLocalDeviceIDFuzzTest(const uint8_t *data, size_t size) -{ - if (data == nullptr || size == 0) { - return; - } - - sptr dBinderService = DBinderService::GetInstance(); - (void)dBinderService->GetLocalDeviceID(); -} -} // namespace OHOS - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - /* Run your code on data */ - OHOS::GetLocalDeviceIDFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/getlocaldeviceid_fuzzer.h b/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/getlocaldeviceid_fuzzer.h deleted file mode 100644 index 4521cd580cc4c5f60f676c205d79801916237c28..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/getlocaldeviceid_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2024-2025 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. - */ - -#ifndef GETLOCALDEVICEID_FUZZER_H -#define GETLOCALDEVICEID_FUZZER_H - -#define FUZZ_PROJECT_NAME "getlocaldeviceid_fuzzer" - -#endif // GETLOCALDEVICEID_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/project.xml b/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/project.xml deleted file mode 100644 index fead0148cd04d58a928607e5df50a6c34c548da6..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getlocaldeviceid_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/BUILD.gn b/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/BUILD.gn deleted file mode 100644 index 16a1c3422c0c9ebb25fb6f9a7e2f0d04d03073c6..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/BUILD.gn +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2024-2025 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. - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/test.gni") - -##############################fuzztest########################################## -ohos_fuzztest("GetSeqNumberFuzzTest") { - module_out_path = "ipc/ipc" - fuzz_config_file = "../getseqnumber_fuzzer" - - cflags = [ - "-fno-omit-frame-pointer", - ] - sources = [ "getseqnumber_fuzzer.cpp" ] - - deps = [ "../../../../../../interfaces/innerkits/libdbinder:libdbinder" ] - - defines = [ "private=public" ] - - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - ] -} diff --git a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/corpus/init b/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/corpus/init deleted file mode 100644 index 23c84fa999f51483ed0811ca324b5f51174209d0..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/corpus/init +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2024-2025 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/dbinder/dbinder_service/src/getseqnumber_fuzzer/getseqnumber_fuzzer.cpp b/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/getseqnumber_fuzzer.cpp deleted file mode 100644 index 0574e9285a2b54dc95627bc14ef18ca66e4a4161..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/getseqnumber_fuzzer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2024-2025 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. - */ - -#include "getseqnumber_fuzzer.h" - -#include - -namespace OHOS { - -void GetSeqNumberFuzzTest(const uint8_t *data, size_t size) -{ - if (data == nullptr || size == 0) { - return; - } - - sptr dBinderService = DBinderService::GetInstance(); - (void)dBinderService->GetSeqNumber(); -} -} // namespace OHOS - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - /* Run your code on data */ - OHOS::GetSeqNumberFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/getseqnumber_fuzzer.h b/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/getseqnumber_fuzzer.h deleted file mode 100644 index b959eb7ea9fc06c39d951ab30963621f0d556ac6..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/getseqnumber_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2024-2025 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. - */ - -#ifndef GETSEQNUMBER_FUZZER_H -#define GETSEQNUMBER_FUZZER_H - -#define FUZZ_PROJECT_NAME "getseqnumber_fuzzer" - -#endif // GETSEQNUMBER_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/project.xml b/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/project.xml deleted file mode 100644 index fead0148cd04d58a928607e5df50a6c34c548da6..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/getseqnumber_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/BUILD.gn b/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/BUILD.gn deleted file mode 100644 index ec84ca5f8ba8b46c0c1290c8ac1d92f3a6626579..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/BUILD.gn +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2024-2025 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. - -#####################hydra-fuzz################### -import("//build/config/features.gni") -import("//build/test.gni") - -##############################fuzztest########################################## -ohos_fuzztest("ReStartRemoteListenerFuzzTest") { - module_out_path = "ipc/ipc" - fuzz_config_file = "../restartremotelistener_fuzzer" - - cflags = [ - "-fno-omit-frame-pointer", - ] - sources = [ "restartremotelistener_fuzzer.cpp" ] - - deps = [ "../../../../../../interfaces/innerkits/libdbinder:libdbinder" ] - - defines = [ "private=public" ] - - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - ] -} diff --git a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/corpus/init b/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/corpus/init deleted file mode 100644 index 23c84fa999f51483ed0811ca324b5f51174209d0..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/corpus/init +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2024-2025 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/dbinder/dbinder_service/src/restartremotelistener_fuzzer/project.xml b/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/project.xml deleted file mode 100644 index fead0148cd04d58a928607e5df50a6c34c548da6..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/restartremotelistener_fuzzer.cpp b/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/restartremotelistener_fuzzer.cpp deleted file mode 100644 index a098235d04b62e450816cfeda438330bab15a792..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/restartremotelistener_fuzzer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2024-2025 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. - */ - -#include "restartremotelistener_fuzzer.h" - -#include - -namespace OHOS { - -void ReStartRemoteListenerFuzzTest(const uint8_t *data, size_t size) -{ - if (data == nullptr || size == 0) { - return; - } - - sptr dBinderService = DBinderService::GetInstance(); - (void)dBinderService->ReStartRemoteListener(); -} -} // namespace OHOS - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - /* Run your code on data */ - OHOS::ReStartRemoteListenerFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/restartremotelistener_fuzzer.h b/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/restartremotelistener_fuzzer.h deleted file mode 100644 index 936fac1a6ed9fd7a5a092481cdb270cef454acae..0000000000000000000000000000000000000000 --- a/test/fuzztest/dbinder/dbinder_service/src/restartremotelistener_fuzzer/restartremotelistener_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2024-2025 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. - */ - -#ifndef RESTARTREMOTELISTENER_FUZZER_H -#define RESTARTREMOTELISTENER_FUZZER_H - -#define FUZZ_PROJECT_NAME "restartremotelistener_fuzzer" - -#endif // RESTARTREMOTELISTENER_FUZZER_H \ No newline at end of file