diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index 191d2a31d484b0a5013abd5eeef017faaf5e55cc..30050f65501e4b6a7eef371018a72ceecd1e539b 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -155,21 +155,6 @@ group("fuzztest") { "containerslistremovebyindex_fuzzer:fuzztest", "containerslistset_fuzzer:fuzztest", "containerslistsort_fuzzer:fuzztest", - "containersprivatearraylist_fuzzer:fuzztest", - "containersprivatedeque_fuzzer:fuzztest", - "containersprivatehashmap_fuzzer:fuzztest", - "containersprivatehashset_fuzzer:fuzztest", - "containersprivatelightweightmap_fuzzer:fuzztest", - "containersprivatelightweightset_fuzzer:fuzztest", - "containersprivatelinkedlist_fuzzer:fuzztest", - "containersprivatelist_fuzzer:fuzztest", - "containersprivateload_fuzzer:fuzztest", - "containersprivateplainarray_fuzzer:fuzztest", - "containersprivatequeue_fuzzer:fuzztest", - "containersprivatestack_fuzzer:fuzztest", - "containersprivatetreemap_fuzzer:fuzztest", - "containersprivatetreeset_fuzzer:fuzztest", - "containersprivatevector_fuzzer:fuzztest", "containersqueue_fuzzer:fuzztest", "containersqueueadd_fuzzer:fuzztest", "containersqueueforeach_fuzzer:fuzztest", @@ -255,15 +240,12 @@ group("fuzztest") { "functionrefcall_fuzzer:fuzztest", "functionrefconstructor_fuzzer:fuzztest", "functionrefgetfunctionprototype_fuzzer:fuzztest", - "functionrefinherit_fuzzer:fuzztest", "functionrefisnative_fuzzer:fuzztest", "functionrefname_fuzzer:fuzztest", "functionrefnew_fuzzer:fuzztest", "functionrefnewclassfunction_fuzzer:fuzztest", - "generatorfunctionref_fuzzer:fuzztest", "getallocationprofile_fuzzer:fuzztest", "getbundlename_fuzzer:fuzztest", - "getformatfunction_fuzzer:fuzztest", "getjspandafile_fuzzer:fuzztest", "getmodulename_fuzzer:fuzztest", "getnativepointerfield_fuzzer:fuzztest", @@ -272,8 +254,6 @@ group("fuzztest") { "int32arrayrefnew_fuzzer:fuzztest", "int8arrayrefnew_fuzzer:fuzztest", "integerrefnewvalue_fuzzer:fuzztest", - "jsnapiaddworker_fuzzer:fuzztest", - "jsnapicontext_fuzzer:fuzztest", "jsnapideleteserializationdata_fuzzer:fuzztest", "jsnapideserializevalue_fuzzer:fuzztest", "jsnapiexception_fuzzer:fuzztest", diff --git a/test/fuzztest/bufferrefnew_fuzzer/bufferrefnew_fuzzer.cpp b/test/fuzztest/bufferrefnew_fuzzer/bufferrefnew_fuzzer.cpp index 353b01be7ea801457ae73c5a143ab5823daf5f6c..75c7af9f733391ff9b397078133defbe76caab46 100644 --- a/test/fuzztest/bufferrefnew_fuzzer/bufferrefnew_fuzzer.cpp +++ b/test/fuzztest/bufferrefnew_fuzzer/bufferrefnew_fuzzer.cpp @@ -48,7 +48,7 @@ void BufferRefMultiParamNewFuzzTest(const uint8_t *data, size_t size) JSNApi::DestroyJSVM(vm); } -void BufferRefByteLengthFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) +void BufferRefByteLengthFuzzTest(const uint8_t *data, size_t size) { RuntimeOption option; option.SetLogLevel(common::LOG_LEVEL::ERROR); @@ -57,12 +57,13 @@ void BufferRefByteLengthFuzzTest([[maybe_unused]]const uint8_t *data, size_t siz LOG_ECMA(ERROR) << "illegal input!"; return; } - Local buffer = BufferRef::New(vm, (int32_t)size); + NativePointerCallback deleter = nullptr; + Local buffer = BufferRef::New(vm, (void *)data, (int32_t)size, deleter, (void *)data); buffer->ByteLength(vm); JSNApi::DestroyJSVM(vm); } -void BufferRefGetBufferFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) +void BufferRefGetBufferFuzzTest(const uint8_t *data, size_t size) { RuntimeOption option; option.SetLogLevel(common::LOG_LEVEL::ERROR); @@ -71,12 +72,13 @@ void BufferRefGetBufferFuzzTest([[maybe_unused]]const uint8_t *data, size_t size LOG_ECMA(ERROR) << "illegal input!"; return; } - Local buffer = BufferRef::New(vm, (int32_t)size); + NativePointerCallback deleter = nullptr; + Local buffer = BufferRef::New(vm, (void *)data, (int32_t)size, deleter, (void *)data); buffer->GetBuffer(vm); JSNApi::DestroyJSVM(vm); } -void BufferToStringCallbackFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) +void BufferToStringCallbackFuzzTest(const uint8_t *data, size_t size) { RuntimeOption option; option.SetLogLevel(common::LOG_LEVEL::ERROR); @@ -85,7 +87,8 @@ void BufferToStringCallbackFuzzTest([[maybe_unused]]const uint8_t *data, size_t LOG_ECMA(ERROR) << "illegal input!"; return; } - Local buffer = BufferRef::New(vm, (int32_t)size); + NativePointerCallback deleter = nullptr; + Local buffer = BufferRef::New(vm, (void *)data, (int32_t)size, deleter, (void *)data); buffer->ToString(vm); JSNApi::DestroyJSVM(vm); } diff --git a/test/fuzztest/containersprivatearraylist_fuzzer/BUILD.gn b/test/fuzztest/containersprivatearraylist_fuzzer/BUILD.gn deleted file mode 100644 index d7719fb2fa6477a6b95358fae873c9be7c595650..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatearraylist_fuzzer/BUILD.gn +++ /dev/null @@ -1,45 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateArrayListFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "//arkcompiler/ets_runtime/test/fuzztest/containersprivatearraylist_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatearraylist_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateArrayListFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatearraylist_fuzzer/containersprivatearraylist_fuzzer.cpp b/test/fuzztest/containersprivatearraylist_fuzzer/containersprivatearraylist_fuzzer.cpp deleted file mode 100644 index 30b93c7e5a63e677df8c206aec7e74cfe8b892dd..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatearraylist_fuzzer/containersprivatearraylist_fuzzer.cpp +++ /dev/null @@ -1,44 +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. - */ - -#include "containersprivatearraylist_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateArrayListFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::ArrayList); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateArrayListFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatearraylist_fuzzer/containersprivatearraylist_fuzzer.h b/test/fuzztest/containersprivatearraylist_fuzzer/containersprivatearraylist_fuzzer.h deleted file mode 100644 index 0ea9a0102b6206e62e4f0f9143a743101d38cd15..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatearraylist_fuzzer/containersprivatearraylist_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATEARRAYLIST_FUZZER_H -#define CONTAINERSPRIVATEARRAYLIST_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatearraylist_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatearraylist_fuzzer/corpus/init b/test/fuzztest/containersprivatearraylist_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatearraylist_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatearraylist_fuzzer/project.xml b/test/fuzztest/containersprivatearraylist_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatearraylist_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h b/test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h deleted file mode 100644 index d4b8dc7ab30e70283cfb28bbe958150e2c2e1d6d..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h +++ /dev/null @@ -1,79 +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. - */ - -#ifndef CONTAINERSPRIVATECOMMON_FUZZER_H -#define CONTAINERSPRIVATECOMMON_FUZZER_H - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "ecmascript/ecma_runtime_call_info.h" -#include "ecmascript/js_thread.h" - -namespace panda::ecmascript { -class ContainersPrivateFuzzTestHelper { -public: - static JSFunction *JSObjectCreate(JSThread *thread) - { - EcmaVM *ecmaVM = thread->GetEcmaVM(); - JSHandle globalEnv = ecmaVM->GetGlobalEnv(); - return globalEnv->GetObjectFunction().GetObject(); - } - - static EcmaRuntimeCallInfo *CreateEcmaRuntimeCallInfo(JSThread *thread, uint32_t numArgs) - { - auto factory = thread->GetEcmaVM()->GetFactory(); - JSHandle hclass(thread, JSObjectCreate(thread)); - JSHandle callee(factory->NewJSObjectByConstructor(JSHandle::Cast(hclass), hclass)); - JSHandle undefined = thread->GlobalConstants()->GetHandledUndefined(); - EcmaRuntimeCallInfo *objCallInfo = - EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, callee, undefined, numArgs); - return objCallInfo; - } - - static void ContainersPrivateCommonFuzzTest([[maybe_unused]] const uint8_t* data, size_t size, uint8_t tag) - { - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - { - JsiFastNativeScope scope(vm); - auto thread = vm->GetAssociatedJSThread(); - - if (size <= 0) { - return; - } - - auto factory = thread->GetEcmaVM()->GetFactory(); - JSHandle env = thread->GetEcmaVM()->GetGlobalEnv(); - JSHandle globalObject = env->GetJSGlobalObject(); - JSHandle key(factory->NewFromASCII("ArkPrivate")); - JSHandle value = - JSObject::GetProperty(thread, JSHandle(globalObject), key).GetValue(); - - auto objCallInfo = CreateEcmaRuntimeCallInfo(thread, 6); // 6 : means the argv length - objCallInfo->SetFunction(JSTaggedValue::Undefined()); - objCallInfo->SetThis(value.GetTaggedValue()); - objCallInfo->SetCallArg(0, JSTaggedValue(static_cast(tag))); // 0 means the argument - containers::ContainersPrivate::Load(objCallInfo); - } - JSNApi::DestroyJSVM(vm); - } -}; -} -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatedeque_fuzzer/BUILD.gn b/test/fuzztest/containersprivatedeque_fuzzer/BUILD.gn deleted file mode 100644 index 5f8469039b06e235231776dd9314ca4876617987..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatedeque_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateDequeFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatedeque_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatedeque_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateDequeFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatedeque_fuzzer/containersprivatedeque_fuzzer.cpp b/test/fuzztest/containersprivatedeque_fuzzer/containersprivatedeque_fuzzer.cpp deleted file mode 100644 index 24787c4908a9f34d37dd7897c52aeb5a999c7367..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatedeque_fuzzer/containersprivatedeque_fuzzer.cpp +++ /dev/null @@ -1,44 +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. - */ - -#include "containersprivatedeque_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateDequeFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::Deque); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateDequeFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatedeque_fuzzer/containersprivatedeque_fuzzer.h b/test/fuzztest/containersprivatedeque_fuzzer/containersprivatedeque_fuzzer.h deleted file mode 100644 index feeb49e31366d44d92e0820f2738ee745486d8f9..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatedeque_fuzzer/containersprivatedeque_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATEDEQUE_FUZZER_H -#define CONTAINERSPRIVATEDEQUE_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatedeque_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatedeque_fuzzer/corpus/init b/test/fuzztest/containersprivatedeque_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatedeque_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatedeque_fuzzer/project.xml b/test/fuzztest/containersprivatedeque_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatedeque_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatehashmap_fuzzer/BUILD.gn b/test/fuzztest/containersprivatehashmap_fuzzer/BUILD.gn deleted file mode 100644 index 7bbb631a9ea5cc7029e344360f803b815bbc6fa5..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashmap_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateHashMapFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatehashmap_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatehashmap_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateHashMapFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatehashmap_fuzzer/containersprivatehashmap_fuzzer.cpp b/test/fuzztest/containersprivatehashmap_fuzzer/containersprivatehashmap_fuzzer.cpp deleted file mode 100644 index ce1b76fae5265100746a2b9064b8f06a1013fb47..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashmap_fuzzer/containersprivatehashmap_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatehashmap_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateHashMapFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::HashMap); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateHashMapFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatehashmap_fuzzer/containersprivatehashmap_fuzzer.h b/test/fuzztest/containersprivatehashmap_fuzzer/containersprivatehashmap_fuzzer.h deleted file mode 100644 index 36a85ce930d4fa1c988ac98ec8442f26b5685a7f..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashmap_fuzzer/containersprivatehashmap_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATEHASHMAP_FUZZER_H -#define CONTAINERSPRIVATEHASHMAP_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatehashmap_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatehashmap_fuzzer/corpus/init b/test/fuzztest/containersprivatehashmap_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashmap_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatehashmap_fuzzer/project.xml b/test/fuzztest/containersprivatehashmap_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashmap_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatehashset_fuzzer/BUILD.gn b/test/fuzztest/containersprivatehashset_fuzzer/BUILD.gn deleted file mode 100644 index d438f41a827e373922c2e6704d6c5287bd6de654..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashset_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateHashSetFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatehashset_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatehashset_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateHashSetFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatehashset_fuzzer/containersprivatehashset_fuzzer.cpp b/test/fuzztest/containersprivatehashset_fuzzer/containersprivatehashset_fuzzer.cpp deleted file mode 100644 index 6a25ab72e5f8bc6c0378a90b4141072083552cdf..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashset_fuzzer/containersprivatehashset_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatehashset_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateHashSetFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::HashSet); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateHashSetFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatehashset_fuzzer/containersprivatehashset_fuzzer.h b/test/fuzztest/containersprivatehashset_fuzzer/containersprivatehashset_fuzzer.h deleted file mode 100644 index 0e77cc261d1febf32092afa95fac8a40efa34ff6..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashset_fuzzer/containersprivatehashset_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATEHASHSET_FUZZER_H -#define CONTAINERSPRIVATEHASHSET_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatehashset_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatehashset_fuzzer/corpus/init b/test/fuzztest/containersprivatehashset_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashset_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatehashset_fuzzer/project.xml b/test/fuzztest/containersprivatehashset_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatehashset_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatelightweightmap_fuzzer/BUILD.gn b/test/fuzztest/containersprivatelightweightmap_fuzzer/BUILD.gn deleted file mode 100644 index 704e572a7335b28dd72dda8d92c6d1020bf6f938..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightmap_fuzzer/BUILD.gn +++ /dev/null @@ -1,45 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateLightWeightMapFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "//arkcompiler/ets_runtime/test/fuzztest/containersprivatelightweightmap_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatelightweightmap_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateLightWeightMapFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatelightweightmap_fuzzer/containersprivatelightweightmap_fuzzer.cpp b/test/fuzztest/containersprivatelightweightmap_fuzzer/containersprivatelightweightmap_fuzzer.cpp deleted file mode 100644 index c4b439f140945ff7fe527240bf1666e4c740bd49..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightmap_fuzzer/containersprivatelightweightmap_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatelightweightmap_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateLightWeightMapFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::LightWeightMap); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateLightWeightMapFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatelightweightmap_fuzzer/containersprivatelightweightmap_fuzzer.h b/test/fuzztest/containersprivatelightweightmap_fuzzer/containersprivatelightweightmap_fuzzer.h deleted file mode 100644 index 8d6594f1eefbe8f927d1e8af74e2eefa8f1a8526..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightmap_fuzzer/containersprivatelightweightmap_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATELIGHTWEIGHTMAP_FUZZER_H -#define CONTAINERSPRIVATELIGHTWEIGHTMAP_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatelightweightmap_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatelightweightmap_fuzzer/corpus/init b/test/fuzztest/containersprivatelightweightmap_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightmap_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatelightweightmap_fuzzer/project.xml b/test/fuzztest/containersprivatelightweightmap_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightmap_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatelightweightset_fuzzer/BUILD.gn b/test/fuzztest/containersprivatelightweightset_fuzzer/BUILD.gn deleted file mode 100644 index 52d9807bbd3e9be10dafddf2adc7d158305e6a73..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightset_fuzzer/BUILD.gn +++ /dev/null @@ -1,45 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateLightWeightSetFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "//arkcompiler/ets_runtime/test/fuzztest/containersprivatelightweightset_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatelightweightset_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateLightWeightSetFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatelightweightset_fuzzer/containersprivatelightweightset_fuzzer.cpp b/test/fuzztest/containersprivatelightweightset_fuzzer/containersprivatelightweightset_fuzzer.cpp deleted file mode 100644 index 1cb09cbd7817de0697a3051bcc44cb6ed151f430..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightset_fuzzer/containersprivatelightweightset_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatelightweightset_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateLightWeightSetFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::LightWeightSet); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateLightWeightSetFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatelightweightset_fuzzer/containersprivatelightweightset_fuzzer.h b/test/fuzztest/containersprivatelightweightset_fuzzer/containersprivatelightweightset_fuzzer.h deleted file mode 100644 index c1516f0d6027ab325fe4f08f19c9ee93cfee49e2..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightset_fuzzer/containersprivatelightweightset_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATELIGHTWEIGHTSET_FUZZER_H -#define CONTAINERSPRIVATELIGHTWEIGHTSET_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatelightweightset_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatelightweightset_fuzzer/corpus/init b/test/fuzztest/containersprivatelightweightset_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightset_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatelightweightset_fuzzer/project.xml b/test/fuzztest/containersprivatelightweightset_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelightweightset_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatelinkedlist_fuzzer/BUILD.gn b/test/fuzztest/containersprivatelinkedlist_fuzzer/BUILD.gn deleted file mode 100644 index c10d26cda59a77ca1cebda618a587b129d639f87..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelinkedlist_fuzzer/BUILD.gn +++ /dev/null @@ -1,45 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateLinkedListFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "//arkcompiler/ets_runtime/test/fuzztest/containersprivatelinkedlist_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatelinkedlist_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateLinkedListFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatelinkedlist_fuzzer/containersprivatelinkedlist_fuzzer.cpp b/test/fuzztest/containersprivatelinkedlist_fuzzer/containersprivatelinkedlist_fuzzer.cpp deleted file mode 100644 index 03164f5abea158cba298be46a222a2266e8077ad..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelinkedlist_fuzzer/containersprivatelinkedlist_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatelinkedlist_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateLinkedListFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::LinkedList); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateLinkedListFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatelinkedlist_fuzzer/containersprivatelinkedlist_fuzzer.h b/test/fuzztest/containersprivatelinkedlist_fuzzer/containersprivatelinkedlist_fuzzer.h deleted file mode 100644 index fed43f89c7e75ac6f05ecbef7667328917221d96..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelinkedlist_fuzzer/containersprivatelinkedlist_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATELINKEDLIST_FUZZER_H -#define CONTAINERSPRIVATELINKEDLIST_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatelinkedlist_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatelinkedlist_fuzzer/corpus/init b/test/fuzztest/containersprivatelinkedlist_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelinkedlist_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatelinkedlist_fuzzer/project.xml b/test/fuzztest/containersprivatelinkedlist_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelinkedlist_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatelist_fuzzer/BUILD.gn b/test/fuzztest/containersprivatelist_fuzzer/BUILD.gn deleted file mode 100644 index 27eb843758fc28d61da0c584ac0b15b2048473b6..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelist_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateListFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatelist_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatelist_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateListFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatelist_fuzzer/containersprivatelist_fuzzer.cpp b/test/fuzztest/containersprivatelist_fuzzer/containersprivatelist_fuzzer.cpp deleted file mode 100644 index 54ffee34bd108d08eb35cf17cc4b658a93628757..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelist_fuzzer/containersprivatelist_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatelist_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateListFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::List); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateListFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatelist_fuzzer/containersprivatelist_fuzzer.h b/test/fuzztest/containersprivatelist_fuzzer/containersprivatelist_fuzzer.h deleted file mode 100644 index ae1d0e377af02f390f4a85ca88f700f9b1e85002..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelist_fuzzer/containersprivatelist_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATELIST_FUZZER_H -#define CONTAINERSPRIVATELIST_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatelist_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatelist_fuzzer/corpus/init b/test/fuzztest/containersprivatelist_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelist_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatelist_fuzzer/project.xml b/test/fuzztest/containersprivatelist_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatelist_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivateload_fuzzer/BUILD.gn b/test/fuzztest/containersprivateload_fuzzer/BUILD.gn deleted file mode 100644 index 5a23c11e2d2c39d818f6c2f0b231a78f564f7c0e..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateload_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateLoadFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivateload_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivateload_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateLoadFuzzTest" ] -} diff --git a/test/fuzztest/containersprivateload_fuzzer/containersprivateload_fuzzer.cpp b/test/fuzztest/containersprivateload_fuzzer/containersprivateload_fuzzer.cpp deleted file mode 100644 index 5e529af89e0ea44f3b56a66cd32642acfa92d7f7..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateload_fuzzer/containersprivateload_fuzzer.cpp +++ /dev/null @@ -1,44 +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. - */ - -#include "containersprivateload_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateLoadFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, *data); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateLoadFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivateload_fuzzer/containersprivateload_fuzzer.h b/test/fuzztest/containersprivateload_fuzzer/containersprivateload_fuzzer.h deleted file mode 100644 index d30c67ae33900809deb34b93cee9e319a6716735..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateload_fuzzer/containersprivateload_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATELOAD_FUZZER_H -#define CONTAINERSPRIVATELOAD_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivateload_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivateload_fuzzer/corpus/init b/test/fuzztest/containersprivateload_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateload_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivateload_fuzzer/project.xml b/test/fuzztest/containersprivateload_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateload_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivateplainarray_fuzzer/BUILD.gn b/test/fuzztest/containersprivateplainarray_fuzzer/BUILD.gn deleted file mode 100644 index c7476732b040f2e3d2657134aa867f8497eca695..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateplainarray_fuzzer/BUILD.gn +++ /dev/null @@ -1,45 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivatePlainArrayFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "//arkcompiler/ets_runtime/test/fuzztest/containersprivateplainarray_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivateplainarray_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivatePlainArrayFuzzTest" ] -} diff --git a/test/fuzztest/containersprivateplainarray_fuzzer/containersprivateplainarray_fuzzer.cpp b/test/fuzztest/containersprivateplainarray_fuzzer/containersprivateplainarray_fuzzer.cpp deleted file mode 100644 index 5d936214cfb7b31b60a33b7d6730b2a6726e9e64..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateplainarray_fuzzer/containersprivateplainarray_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivateplainarray_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivatePlainArrayFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::PlainArray); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivatePlainArrayFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivateplainarray_fuzzer/containersprivateplainarray_fuzzer.h b/test/fuzztest/containersprivateplainarray_fuzzer/containersprivateplainarray_fuzzer.h deleted file mode 100644 index b6a922e1773604aafcb60dffccd5e1162a44d863..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateplainarray_fuzzer/containersprivateplainarray_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATEPLAINARRAY_FUZZER_H -#define CONTAINERSPRIVATEPLAINARRAY_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivateplainarray_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivateplainarray_fuzzer/corpus/init b/test/fuzztest/containersprivateplainarray_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateplainarray_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivateplainarray_fuzzer/project.xml b/test/fuzztest/containersprivateplainarray_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivateplainarray_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatequeue_fuzzer/BUILD.gn b/test/fuzztest/containersprivatequeue_fuzzer/BUILD.gn deleted file mode 100644 index 7ac6030772212b1d47625fee6c8f4a1182991901..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatequeue_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateQueueFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatequeue_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatequeue_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateQueueFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatequeue_fuzzer/containersprivatequeue_fuzzer.cpp b/test/fuzztest/containersprivatequeue_fuzzer/containersprivatequeue_fuzzer.cpp deleted file mode 100644 index ae0e6cadaeaaac0d5d506636a1dbbac9dfccf208..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatequeue_fuzzer/containersprivatequeue_fuzzer.cpp +++ /dev/null @@ -1,44 +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. - */ - -#include "containersprivatequeue_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateQueueFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::Queue); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateQueueFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatequeue_fuzzer/containersprivatequeue_fuzzer.h b/test/fuzztest/containersprivatequeue_fuzzer/containersprivatequeue_fuzzer.h deleted file mode 100644 index a883d2c3c1b6a94ad8690a58d4952fc32068676f..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatequeue_fuzzer/containersprivatequeue_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATEQUEUE_FUZZER_H -#define CONTAINERSPRIVATEQUEUE_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatequeue_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatequeue_fuzzer/corpus/init b/test/fuzztest/containersprivatequeue_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatequeue_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatequeue_fuzzer/project.xml b/test/fuzztest/containersprivatequeue_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatequeue_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatestack_fuzzer/BUILD.gn b/test/fuzztest/containersprivatestack_fuzzer/BUILD.gn deleted file mode 100644 index 2fc0553a2147b7ee5a582b92c51343031374446b..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatestack_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateStackFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatestack_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatestack_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateStackFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatestack_fuzzer/containersprivatestack_fuzzer.cpp b/test/fuzztest/containersprivatestack_fuzzer/containersprivatestack_fuzzer.cpp deleted file mode 100644 index 25b23e3c78a0ca7d89a61e357a4921cbe2dcc36d..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatestack_fuzzer/containersprivatestack_fuzzer.cpp +++ /dev/null @@ -1,44 +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. - */ - -#include "containersprivatestack_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateStackFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::Stack); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateStackFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatestack_fuzzer/containersprivatestack_fuzzer.h b/test/fuzztest/containersprivatestack_fuzzer/containersprivatestack_fuzzer.h deleted file mode 100644 index 8df206ce1115fd1a0d44160b82dc9d7bdace4c66..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatestack_fuzzer/containersprivatestack_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATESTACK_FUZZER_H -#define CONTAINERSPRIVATESTACK_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatestack_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatestack_fuzzer/corpus/init b/test/fuzztest/containersprivatestack_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatestack_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatestack_fuzzer/project.xml b/test/fuzztest/containersprivatestack_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatestack_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatetreemap_fuzzer/BUILD.gn b/test/fuzztest/containersprivatetreemap_fuzzer/BUILD.gn deleted file mode 100644 index e0cc63f26b00a2ea67013d7c204e810a7231c1b1..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreemap_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateTreeMapFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatetreemap_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatetreemap_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateTreeMapFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatetreemap_fuzzer/containersprivatetreemap_fuzzer.cpp b/test/fuzztest/containersprivatetreemap_fuzzer/containersprivatetreemap_fuzzer.cpp deleted file mode 100644 index e9caf6e90c3e66cdd93de598e6a238c0bb40e69b..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreemap_fuzzer/containersprivatetreemap_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatetreemap_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateTreeMapFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::TreeMap); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateTreeMapFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatetreemap_fuzzer/containersprivatetreemap_fuzzer.h b/test/fuzztest/containersprivatetreemap_fuzzer/containersprivatetreemap_fuzzer.h deleted file mode 100644 index 563241031ff2bae5ce7ebcc61669ea9601f87601..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreemap_fuzzer/containersprivatetreemap_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATETREEMAP_FUZZER_H -#define CONTAINERSPRIVATETREEMAP_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatetreemap_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatetreemap_fuzzer/corpus/init b/test/fuzztest/containersprivatetreemap_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreemap_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatetreemap_fuzzer/project.xml b/test/fuzztest/containersprivatetreemap_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreemap_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatetreeset_fuzzer/BUILD.gn b/test/fuzztest/containersprivatetreeset_fuzzer/BUILD.gn deleted file mode 100644 index 9dccebbf8f68018b69959a9e94895f4993f4a62e..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreeset_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateTreeSetFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatetreeset_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatetreeset_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateTreeSetFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatetreeset_fuzzer/containersprivatetreeset_fuzzer.cpp b/test/fuzztest/containersprivatetreeset_fuzzer/containersprivatetreeset_fuzzer.cpp deleted file mode 100644 index 6eacefb9793db57512cb3d6ec48028f56639b8cb..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreeset_fuzzer/containersprivatetreeset_fuzzer.cpp +++ /dev/null @@ -1,45 +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. - */ - -#include "containersprivatetreeset_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateTreeSetFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::TreeSet); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateTreeSetFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatetreeset_fuzzer/containersprivatetreeset_fuzzer.h b/test/fuzztest/containersprivatetreeset_fuzzer/containersprivatetreeset_fuzzer.h deleted file mode 100644 index a0341648b08d06743479c2ae9ac767ba0b39b07e..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreeset_fuzzer/containersprivatetreeset_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATETREESET_FUZZER_H -#define CONTAINERSPRIVATETREESET_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatetreeset_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatetreeset_fuzzer/corpus/init b/test/fuzztest/containersprivatetreeset_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreeset_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatetreeset_fuzzer/project.xml b/test/fuzztest/containersprivatetreeset_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatetreeset_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/containersprivatevector_fuzzer/BUILD.gn b/test/fuzztest/containersprivatevector_fuzzer/BUILD.gn deleted file mode 100644 index d5b395220e560b6e1ca4eb74f609f83b3f4f85af..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatevector_fuzzer/BUILD.gn +++ /dev/null @@ -1,46 +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. - -##################################hydra-fuzz################################### -import("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("ContainersPrivateVectorFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = - "//arkcompiler/ets_runtime/test/fuzztest/containersprivatevector_fuzzer" - - resource_config_file = - "//arkcompiler/ets_runtime/test/resource/js_runtime/ohos_test.xml" - - sources = [ "containersprivatevector_fuzzer.cpp" ] - - configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ] - - deps = [ "../../../:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":ContainersPrivateVectorFuzzTest" ] -} diff --git a/test/fuzztest/containersprivatevector_fuzzer/containersprivatevector_fuzzer.cpp b/test/fuzztest/containersprivatevector_fuzzer/containersprivatevector_fuzzer.cpp deleted file mode 100644 index 936a9abbe44d5db419ebcab7337b19ef4c36d185..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatevector_fuzzer/containersprivatevector_fuzzer.cpp +++ /dev/null @@ -1,44 +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. - */ - -#include "containersprivatevector_fuzzer.h" -#include "test/fuzztest/containersprivatecommon_fuzzer/containersprivatecommon_fuzzer.h" - -#include "ecmascript/containers/containers_private.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::test; -using namespace panda::ecmascript; -using namespace panda::ecmascript::containers; - -namespace OHOS { - void ContainersPrivateVectorFuzzTest(const uint8_t* data, size_t size) - { - ContainersPrivateFuzzTestHelper::ContainersPrivateCommonFuzzTest(data, size, ContainerTag::Vector); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::ContainersPrivateVectorFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/containersprivatevector_fuzzer/containersprivatevector_fuzzer.h b/test/fuzztest/containersprivatevector_fuzzer/containersprivatevector_fuzzer.h deleted file mode 100644 index 4894afdf84b543483a94ec6b352e88fd429e935e..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatevector_fuzzer/containersprivatevector_fuzzer.h +++ /dev/null @@ -1,21 +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. - */ - -#ifndef CONTAINERSPRIVATEVECTOR_FUZZER_H -#define CONTAINERSPRIVATEVECTOR_FUZZER_H - -#define FUZZ_PROJECT_NAME "containersprivatevector_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/containersprivatevector_fuzzer/corpus/init b/test/fuzztest/containersprivatevector_fuzzer/corpus/init deleted file mode 100644 index d778599a0fe35c4d00c999a3a8b9e67e62e6651a..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatevector_fuzzer/corpus/init +++ /dev/null @@ -1,14 +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. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/containersprivatevector_fuzzer/project.xml b/test/fuzztest/containersprivatevector_fuzzer/project.xml deleted file mode 100644 index 1020c7b430f25037af4c1531f98400dad761bd28..0000000000000000000000000000000000000000 --- a/test/fuzztest/containersprivatevector_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/copyableglobalsetandclearweak_fuzzer/copyableglobalsetandclearweak_fuzzer.cpp b/test/fuzztest/copyableglobalsetandclearweak_fuzzer/copyableglobalsetandclearweak_fuzzer.cpp index 1c348dc357d141f0f0e7298274ab213f2f8c5b33..da0eef103d6c09d2dff22529e713f7de39dbce97 100644 --- a/test/fuzztest/copyableglobalsetandclearweak_fuzzer/copyableglobalsetandclearweak_fuzzer.cpp +++ b/test/fuzztest/copyableglobalsetandclearweak_fuzzer/copyableglobalsetandclearweak_fuzzer.cpp @@ -36,8 +36,8 @@ void CopyableGlobalSetandClearWeakFuzzTest(const uint8_t *data, size_t size) LOG_ECMA(ERROR) << "Parameter out of range."; return; } - Local object = ObjectRef::New(vm); - Global globalObject(vm, object); + Local str = StringRef::NewFromUtf8(vm, (const char *)data); + Global globalObject(vm, str); globalObject.SetWeak(); globalObject.ClearWeak(); } diff --git a/test/fuzztest/functionrefinherit_fuzzer/BUILD.gn b/test/fuzztest/functionrefinherit_fuzzer/BUILD.gn deleted file mode 100644 index cf67eb2408a006e079e6f8254f185d0043fef947..0000000000000000000000000000000000000000 --- a/test/fuzztest/functionrefinherit_fuzzer/BUILD.gn +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2023 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("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("FunctionRefInheritFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "$js_root/test/fuzztest/functionrefinherit_fuzzer" - - resource_config_file = "$js_root/test/resource/js_runtime/ohos_test.xml" - - sources = [ "functionrefinherit_fuzzer.cpp" ] - - configs = [ "$js_root:ecma_test_config" ] - - deps = [ "$js_root:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":FunctionRefInheritFuzzTest" ] -} diff --git a/test/fuzztest/functionrefinherit_fuzzer/corpus/init b/test/fuzztest/functionrefinherit_fuzzer/corpus/init deleted file mode 100644 index 69c5791762c2df3d7e43cb066be9cd8b56f80621..0000000000000000000000000000000000000000 --- a/test/fuzztest/functionrefinherit_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/functionrefinherit_fuzzer/functionrefinherit_fuzzer.cpp b/test/fuzztest/functionrefinherit_fuzzer/functionrefinherit_fuzzer.cpp deleted file mode 100644 index 76ac6e4d00b59022eee3c2879825a81033e3fd88..0000000000000000000000000000000000000000 --- a/test/fuzztest/functionrefinherit_fuzzer/functionrefinherit_fuzzer.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 "functionrefinherit_fuzzer.h" -#include "common_components/base/utf_helper.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_function.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "ecmascript/napi/jsnapi_helper.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace common::utf_helper; - -namespace OHOS { -void FunctionRefInheritFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - { - JsiFastNativeScope scope(vm); - if (size <= 0) { - return; - } - JSThread *thread = vm->GetJSThread(); - JSHandle env = thread->GetEcmaVM()->GetGlobalEnv(); - JSHandle set = env->GetBuiltinsSetFunction(); - Local setLocal = JSNApiHelper::ToLocal(set); - JSHandle map = env->GetBuiltinsMapFunction(); - Local mapLocal = JSNApiHelper::ToLocal(map); - JSHandle setPrototype(thread, JSHandle::Cast(set)->GetFunctionPrototype(thread)); - JSHandle mapPrototype(thread, JSHandle::Cast(map)->GetFunctionPrototype(thread)); - JSHandle mapPrototypeProto(thread, JSTaggedValue::GetPrototype(thread, mapPrototype)); - JSTaggedValue::SameValue(thread, setPrototype, mapPrototypeProto); - mapLocal->Inherit(vm, setLocal); - } - JSNApi::DestroyJSVM(vm); - return; -} -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - // Run your code on data. - OHOS::FunctionRefInheritFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/functionrefinherit_fuzzer/functionrefinherit_fuzzer.h b/test/fuzztest/functionrefinherit_fuzzer/functionrefinherit_fuzzer.h deleted file mode 100644 index 212dfb52b79f1b5ffc875a0466e18b76b8cc683e..0000000000000000000000000000000000000000 --- a/test/fuzztest/functionrefinherit_fuzzer/functionrefinherit_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 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 FUNCTIONREFINHERIT_FUZZER_H -#define FUNCTIONREFINHERIT_FUZZER_H - -#define FUZZ_PROJECT_NAME "functionrefinherit_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/functionrefinherit_fuzzer/project.xml b/test/fuzztest/functionrefinherit_fuzzer/project.xml deleted file mode 100644 index 4fdbc407f205680885fa42663163b5c987f123a6..0000000000000000000000000000000000000000 --- a/test/fuzztest/functionrefinherit_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/functionrefisnative_fuzzer/functionrefisnative_fuzzer.cpp b/test/fuzztest/functionrefisnative_fuzzer/functionrefisnative_fuzzer.cpp index 47f12dbd5cfeac03f19e1124ea9f289a2f630061..162a116726ee64fa930f601f4452ce6f61f9ac44 100644 --- a/test/fuzztest/functionrefisnative_fuzzer/functionrefisnative_fuzzer.cpp +++ b/test/fuzztest/functionrefisnative_fuzzer/functionrefisnative_fuzzer.cpp @@ -36,7 +36,8 @@ void FunctionRefIsNativeFuzzTest([[maybe_unused]]const uint8_t *data, size_t siz return; } FunctionCallback nativeFunc = FuncRefConCallbackForTest; - Local func = FunctionRef::New(vm, nativeFunc); + NativePointerCallback deleter = nullptr; + Local func = FunctionRef::New(vm, nativeFunc, deleter, (void *)data); func->IsNative(vm); JSNApi::DestroyJSVM(vm); } diff --git a/test/fuzztest/generatorfunctionref_fuzzer/BUILD.gn b/test/fuzztest/generatorfunctionref_fuzzer/BUILD.gn deleted file mode 100644 index 41aeb9f3ea627100d22b95fd48fc77714281641b..0000000000000000000000000000000000000000 --- a/test/fuzztest/generatorfunctionref_fuzzer/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2023 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("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("GeneratorFunctionRefFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "$js_root/test/fuzztest/generatorfunctionref_fuzzer" - - sources = [ "generatorfunctionref_fuzzer.cpp" ] - - configs = [ "$js_root:ecma_test_config" ] - - deps = [ "$js_root:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":GeneratorFunctionRefFuzzTest" ] -} diff --git a/test/fuzztest/generatorfunctionref_fuzzer/corpus/init b/test/fuzztest/generatorfunctionref_fuzzer/corpus/init deleted file mode 100644 index 69c5791762c2df3d7e43cb066be9cd8b56f80621..0000000000000000000000000000000000000000 --- a/test/fuzztest/generatorfunctionref_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/generatorfunctionref_fuzzer/generatorfunctionref_fuzzer.cpp b/test/fuzztest/generatorfunctionref_fuzzer/generatorfunctionref_fuzzer.cpp deleted file mode 100644 index 3106f41948f445cba12b27398f975e33899fee30..0000000000000000000000000000000000000000 --- a/test/fuzztest/generatorfunctionref_fuzzer/generatorfunctionref_fuzzer.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 "generatorfunctionref_fuzzer.h" -#include "ecmascript/base/string_helper.h" -#include "ecmascript/ecma_vm.h" -#include "ecmascript/global_env.h" -#include "ecmascript/js_function.h" -#include "ecmascript/js_generator_object.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/js_set.h" -#include "ecmascript/js_tagged_value.h" -#include "ecmascript/linked_hash_table.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "ecmascript/napi/jsnapi_helper.h" -#include "ecmascript/object_factory.h" - -using namespace panda; -using namespace panda::ecmascript; - -namespace OHOS { -Local CreateGeneratorObj(EcmaVM *vm) -{ - auto thread = vm->GetAssociatedJSThread(); - JSHandle env = thread->GetEcmaVM()->GetGlobalEnv(); - ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); - JSHandle genFunc = env->GetGeneratorFunctionFunction(); - JSHandle genObjHandleVal = factory->NewJSGeneratorObject(genFunc); - JSHandle hclass = JSHandle::Cast(env->GetGeneratorFunctionClass()); - JSHandle generatorFunc = JSHandle::Cast(factory->NewJSObject(hclass)); - JSFunction::InitializeJSFunction(thread, generatorFunc, FunctionKind::GENERATOR_FUNCTION); - JSHandle generatorContext = factory->NewGeneratorContext(); - generatorContext->SetMethod(thread, generatorFunc.GetTaggedValue()); - JSHandle generatorContextVal = JSHandle::Cast(generatorContext); - genObjHandleVal->SetGeneratorContext(thread, generatorContextVal.GetTaggedValue()); - JSHandle genObjTagHandleVal = JSHandle::Cast(genObjHandleVal); - return JSNApiHelper::ToLocal(genObjTagHandleVal); -} - -void IsGeneratorFuzztest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - LOG_ECMA(ERROR) << "illegal input!"; - return; - } - Local genObjectRef = CreateGeneratorObj(vm); - Local object = genObjectRef->GetGeneratorFunction(vm); - object->IsGenerator(vm); - JSNApi::DestroyJSVM(vm); -} - -void GetGeneratorStateFuzztest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - LOG_ECMA(ERROR) << "illegal input!"; - return; - } - Local genObjectRef = CreateGeneratorObj(vm); - genObjectRef->GetGeneratorState(vm); - JSNApi::DestroyJSVM(vm); -} - -void GetGeneratorFunctionFuzztest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - LOG_ECMA(ERROR) << "illegal input!"; - return; - } - Local genObjectRef = CreateGeneratorObj(vm); - genObjectRef->GetGeneratorFunction(vm); - JSNApi::DestroyJSVM(vm); -} -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - // Run your code on data. - OHOS::IsGeneratorFuzztest(data, size); - OHOS::GetGeneratorStateFuzztest(data, size); - OHOS::GetGeneratorFunctionFuzztest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/generatorfunctionref_fuzzer/generatorfunctionref_fuzzer.h b/test/fuzztest/generatorfunctionref_fuzzer/generatorfunctionref_fuzzer.h deleted file mode 100644 index 179d8a484553672b031d8c5d6f96a75978ae00e7..0000000000000000000000000000000000000000 --- a/test/fuzztest/generatorfunctionref_fuzzer/generatorfunctionref_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 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 GENERATORFUNCTIONREF_FUZZER_H -#define GENERATORFUNCTIONREF_FUZZER_H - -#define FUZZ_PROJECT_NAME "generatorfunctionref_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/generatorfunctionref_fuzzer/project.xml b/test/fuzztest/generatorfunctionref_fuzzer/project.xml deleted file mode 100644 index 864ad9ba8ea52c43faa7644a41ecd048a03c5b32..0000000000000000000000000000000000000000 --- a/test/fuzztest/generatorfunctionref_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/getformatfunction_fuzzer/BUILD.gn b/test/fuzztest/getformatfunction_fuzzer/BUILD.gn deleted file mode 100644 index 9a5150db90af0531d42c0e7c3185a50d053cbf85..0000000000000000000000000000000000000000 --- a/test/fuzztest/getformatfunction_fuzzer/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2023 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("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -####################################fuzztest################################## -ohos_fuzztest("GetFormatFunctionFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "$js_root/test/fuzztest/getformatfunction_fuzzer" - - sources = [ "getformatfunction_fuzzer.cpp" ] - - configs = [ "$js_root:ecma_test_config" ] - - deps = [ "$js_root:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":GetFormatFunctionFuzzTest" ] -} diff --git a/test/fuzztest/getformatfunction_fuzzer/corpus/init b/test/fuzztest/getformatfunction_fuzzer/corpus/init deleted file mode 100644 index 69c5791762c2df3d7e43cb066be9cd8b56f80621..0000000000000000000000000000000000000000 --- a/test/fuzztest/getformatfunction_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/getformatfunction_fuzzer/getformatfunction_fuzzer.cpp b/test/fuzztest/getformatfunction_fuzzer/getformatfunction_fuzzer.cpp deleted file mode 100644 index 21f65fb9330e5ee8986abda64eb01650bc2f8957..0000000000000000000000000000000000000000 --- a/test/fuzztest/getformatfunction_fuzzer/getformatfunction_fuzzer.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2023 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 "ecmascript/base/string_helper.h" -#include "ecmascript/global_env.h" -#include "ecmascript/intl/locale_helper.h" -#include "ecmascript/js_date_time_format.h" -#include "ecmascript/js_handle.h" -#include "ecmascript/js_number_format.h" -#include "ecmascript/napi/include/dfx_jsnapi.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "ecmascript/napi/jsnapi_helper.h" -#include "ecmascript/object_factory-inl.h" -#include "getformatfunction_fuzzer.h" - -using namespace panda; -using namespace panda::ecmascript; - -namespace OHOS { -void NumberGetFormatFunctionFuzzerTest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - { - JsiFastNativeScope scope(vm); - auto thread = vm->GetAssociatedJSThread(); - JSHandle env = thread->GetEcmaVM()->GetGlobalEnv(); - ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); - JSHandle ctor = env->GetNumberFormatFunction(); - JSHandle numberFormat = - JSHandle::Cast(factory->NewJSObjectByConstructor(JSHandle(ctor), ctor)); - JSHandle locales(factory->NewFromASCII("zh-Hans-CN")); - JSHandle undefinedOptions(thread, JSTaggedValue::Undefined()); - JSNumberFormat::InitializeNumberFormat(thread, numberFormat, locales, undefinedOptions); - JSHandle numberformatTagHandleVal = JSHandle::Cast(numberFormat); - Local object = JSNApiHelper::ToLocal(numberformatTagHandleVal); - if (size <= 0) { - LOG_ECMA(ERROR) << "illegal input!"; - return; - } - object->GetFormatFunction(vm); - } - JSNApi::DestroyJSVM(vm); -} -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - // Run your code on data. - OHOS::NumberGetFormatFunctionFuzzerTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/getformatfunction_fuzzer/getformatfunction_fuzzer.h b/test/fuzztest/getformatfunction_fuzzer/getformatfunction_fuzzer.h deleted file mode 100644 index a69e5c102667a3ffe862afcdd7b5fc72368dd78b..0000000000000000000000000000000000000000 --- a/test/fuzztest/getformatfunction_fuzzer/getformatfunction_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 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 GETFORMATFUNCTION_FUZZER_H -#define GETFORMATFUNCTION_FUZZER_H - -#define FUZZ_PROJECT_NAME "getformatfunction_fuzzer.h" - -#endif \ No newline at end of file diff --git a/test/fuzztest/getformatfunction_fuzzer/project.xml b/test/fuzztest/getformatfunction_fuzzer/project.xml deleted file mode 100644 index 4fdbc407f205680885fa42663163b5c987f123a6..0000000000000000000000000000000000000000 --- a/test/fuzztest/getformatfunction_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/jsnapiaddworker_fuzzer/BUILD.gn b/test/fuzztest/jsnapiaddworker_fuzzer/BUILD.gn deleted file mode 100644 index 0dcac70d601527734330f28df0471e29671841a7..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapiaddworker_fuzzer/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2023 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("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("JSNApiAddWorkerFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "$js_root/test/fuzztest/jsnapiaddworker_fuzzer" - - sources = [ "jsnapiaddworker_fuzzer.cpp" ] - - configs = [ "$js_root:ecma_test_config" ] - - deps = [ "$js_root:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":JSNApiAddWorkerFuzzTest" ] -} diff --git a/test/fuzztest/jsnapiaddworker_fuzzer/corpus/init b/test/fuzztest/jsnapiaddworker_fuzzer/corpus/init deleted file mode 100644 index 69c5791762c2df3d7e43cb066be9cd8b56f80621..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapiaddworker_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/jsnapiaddworker_fuzzer/jsnapiaddworker_fuzzer.cpp b/test/fuzztest/jsnapiaddworker_fuzzer/jsnapiaddworker_fuzzer.cpp deleted file mode 100644 index e7eb0201a499742643836042f07783a01f84a16a..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapiaddworker_fuzzer/jsnapiaddworker_fuzzer.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2023 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 "jsnapiaddworker_fuzzer.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::ecmascript; - -namespace OHOS { -void JSNApiAddWorkerFuzztest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - LOG_ECMA(ERROR) << "illegal input!"; - return; - } - JSRuntimeOptions optionOne; - EcmaVM *workerVm = JSNApi::CreateEcmaVM(optionOne); - JSNApi::AddWorker(vm, workerVm); - JSNApi::DestroyJSVM(workerVm); - JSNApi::DestroyJSVM(vm); -} -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - // Run your code on data. - OHOS::JSNApiAddWorkerFuzztest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/jsnapiaddworker_fuzzer/jsnapiaddworker_fuzzer.h b/test/fuzztest/jsnapiaddworker_fuzzer/jsnapiaddworker_fuzzer.h deleted file mode 100644 index eb3bd65a486661b783261bb9ccf7726c2d05b17c..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapiaddworker_fuzzer/jsnapiaddworker_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 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 JSNAPIADDWORKER_FUZZER_H -#define JSNAPIADDWORKER_FUZZER_H - -#define FUZZ_PROJECT_NAME "jsnapiaddworker_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/jsnapiaddworker_fuzzer/project.xml b/test/fuzztest/jsnapiaddworker_fuzzer/project.xml deleted file mode 100644 index 864ad9ba8ea52c43faa7644a41ecd048a03c5b32..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapiaddworker_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/jsnapicontext_fuzzer/BUILD.gn b/test/fuzztest/jsnapicontext_fuzzer/BUILD.gn deleted file mode 100644 index 7e3f369fa05e8183c86f4ce1ef63915d98f215c3..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapicontext_fuzzer/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2023 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("//arkcompiler/ets_runtime/js_runtime_config.gni") -import("//arkcompiler/ets_runtime/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") - -##################################fuzztest##################################### -ohos_fuzztest("JSNApiContextFuzzTest") { - module_out_path = ets_runtime_output_path - - fuzz_config_file = "$js_root/test/fuzztest/jsnapicontext_fuzzer" - - sources = [ "jsnapicontext_fuzzer.cpp" ] - - configs = [ "$js_root:ecma_test_config" ] - - deps = [ "$js_root:libark_jsruntime_test" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ sdk_libc_secshared_dep ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":JSNApiContextFuzzTest" ] -} diff --git a/test/fuzztest/jsnapicontext_fuzzer/corpus/init b/test/fuzztest/jsnapicontext_fuzzer/corpus/init deleted file mode 100644 index 69c5791762c2df3d7e43cb066be9cd8b56f80621..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapicontext_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/jsnapicontext_fuzzer/jsnapicontext_fuzzer.cpp b/test/fuzztest/jsnapicontext_fuzzer/jsnapicontext_fuzzer.cpp deleted file mode 100644 index c9766d112cf60bf5ae228f609620f95117ca3f1e..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapicontext_fuzzer/jsnapicontext_fuzzer.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2023 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 "jsnapicontext_fuzzer.h" -#include "ecmascript/ecma_string-inl.h" -#include "ecmascript/napi/include/jsnapi.h" - -using namespace panda; -using namespace panda::ecmascript; - -namespace OHOS { -void JSNApiSwitchCurrentContextFuzztest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - LOG_ECMA(ERROR) << "illegal input!"; - return; - } - - JSNApi::DestroyJSVM(vm); -} -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - // Run your code on data. - OHOS::JSNApiSwitchCurrentContextFuzztest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/jsnapicontext_fuzzer/jsnapicontext_fuzzer.h b/test/fuzztest/jsnapicontext_fuzzer/jsnapicontext_fuzzer.h deleted file mode 100644 index 21bca707fc2054e4d2caf7641f2d0c5d82856469..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapicontext_fuzzer/jsnapicontext_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 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 JSNAPICONTEXT_FUZZER_H -#define JSNAPICONTEXT_FUZZER_H - -#define FUZZ_PROJECT_NAME "jsnapicontext_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/jsnapicontext_fuzzer/project.xml b/test/fuzztest/jsnapicontext_fuzzer/project.xml deleted file mode 100644 index 864ad9ba8ea52c43faa7644a41ecd048a03c5b32..0000000000000000000000000000000000000000 --- a/test/fuzztest/jsnapicontext_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/jsnapiinformation_fuzzer/jsnapiinformation_fuzzer.cpp b/test/fuzztest/jsnapiinformation_fuzzer/jsnapiinformation_fuzzer.cpp index 31e2596997a139b34e0ae0b644aead3efae8d02f..6d00c5fe3d4463f14674d003fd21c303e11b9307 100644 --- a/test/fuzztest/jsnapiinformation_fuzzer/jsnapiinformation_fuzzer.cpp +++ b/test/fuzztest/jsnapiinformation_fuzzer/jsnapiinformation_fuzzer.cpp @@ -23,62 +23,6 @@ using namespace panda; using namespace panda::ecmascript; namespace OHOS { -void JSNApiCreateEcmaVMFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - return; - } - JSRuntimeOptions runtimeOptions; - EcmaVM *workerVm = JSNApi::CreateEcmaVM(runtimeOptions); - JSNApi::DestroyJSVM(workerVm); - JSNApi::DestroyJSVM(vm); -} - -void JSNApiEnableUserUncaughtErrorHandlerFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - return; - } - JSNApi::EnableUserUncaughtErrorHandler(vm); - JSNApi::DestroyJSVM(vm); -} - -void JSNApiFunctionFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - return; - } - std::function cb = [](const std::string &inputPath, - uint8_t **buff, size_t *buffSize) -> bool { - if (inputPath.empty() || buff == nullptr || buffSize == nullptr) { - return false; - } - return false; - }; - JSNApi::DestroyJSVM(vm); -} - -void JSNApiIsMixedDebugEnabledFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - return; - } - JSNApi::IsMixedDebugEnabled(vm); - JSNApi::DestroyJSVM(vm); -} - void JSNApiNotifyNativeCallingFuzzTest(const uint8_t *data, size_t size) { RuntimeOption option; @@ -97,10 +41,6 @@ void JSNApiNotifyNativeCallingFuzzTest(const uint8_t *data, size_t size) extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { // Run your code on data. - OHOS::JSNApiCreateEcmaVMFuzzTest(data, size); - OHOS::JSNApiEnableUserUncaughtErrorHandlerFuzzTest(data, size); - OHOS::JSNApiFunctionFuzzTest(data, size); - OHOS::JSNApiIsMixedDebugEnabledFuzzTest(data, size); OHOS::JSNApiNotifyNativeCallingFuzzTest(data, size); return 0; } \ No newline at end of file diff --git a/test/fuzztest/jsnapiisarrayiterator_fuzzer/jsnapiisarrayiterator_fuzzer.cpp b/test/fuzztest/jsnapiisarrayiterator_fuzzer/jsnapiisarrayiterator_fuzzer.cpp index e1d756ef030878c1ee0396c23f16fafe2a37adf6..e4e84b2dde2ec413b34633779f9e25bc4f0675d1 100644 --- a/test/fuzztest/jsnapiisarrayiterator_fuzzer/jsnapiisarrayiterator_fuzzer.cpp +++ b/test/fuzztest/jsnapiisarrayiterator_fuzzer/jsnapiisarrayiterator_fuzzer.cpp @@ -21,7 +21,7 @@ using namespace panda; using namespace panda::ecmascript; namespace OHOS { -void JSNApiIsArrayIterator_FuzzTest([[maybe_unused]]const uint8_t *data, size_t size) +void JSNApiIsArrayIterator_FuzzTest(const uint8_t *data, size_t size) { RuntimeOption option; option.SetLogLevel(common::LOG_LEVEL::ERROR); @@ -30,8 +30,8 @@ void JSNApiIsArrayIterator_FuzzTest([[maybe_unused]]const uint8_t *data, size_t LOG_ECMA(ERROR) << "illegal input!"; return; } - Local arraybuffer = ArrayBufferRef::New(vm_, (int32_t)size); - arraybuffer->IsArrayIterator(vm_); + Local str = StringRef::NewFromUtf8(vm_, (const char *)data); + str->IsArrayIterator(vm_); JSNApi::DestroyJSVM(vm_); } } diff --git a/test/fuzztest/jsnapiisbundle_fuzzer/jsnapiisbundle_fuzzer.cpp b/test/fuzztest/jsnapiisbundle_fuzzer/jsnapiisbundle_fuzzer.cpp index d2e431a462f264f62b3582b0482762b7260e8ab3..90998d7847cf0bd6bd565e87e968c4f336178bd9 100644 --- a/test/fuzztest/jsnapiisbundle_fuzzer/jsnapiisbundle_fuzzer.cpp +++ b/test/fuzztest/jsnapiisbundle_fuzzer/jsnapiisbundle_fuzzer.cpp @@ -23,7 +23,7 @@ using namespace panda::ecmascript; namespace OHOS { constexpr size_t DIVISOR = 2; -void JSNApiIsBundleFuzztest([[maybe_unused]]const uint8_t *data, size_t size) +void JSNApiIsBundleFuzztest(const uint8_t *data, size_t size) { RuntimeOption option; option.SetLogLevel(common::LOG_LEVEL::ERROR); @@ -32,7 +32,7 @@ void JSNApiIsBundleFuzztest([[maybe_unused]]const uint8_t *data, size_t size) LOG_ECMA(ERROR) << "illegal input!"; return; } - bool bundleFalg = size % DIVISOR ? true : false; + bool bundleFalg = (*data + size) % DIVISOR ? true : false; vm->SetIsBundlePack(bundleFalg); JSNApi::IsBundle(vm); JSNApi::DestroyJSVM(vm); diff --git a/test/fuzztest/jsnapiisconstructor_fuzzer/jsnapiisconstructor_fuzzer.cpp b/test/fuzztest/jsnapiisconstructor_fuzzer/jsnapiisconstructor_fuzzer.cpp index 606299a0e05080966ed116c4343e0d6604070e42..6ba40c14c566ecb4b5a243e25be3a0ebf6583650 100644 --- a/test/fuzztest/jsnapiisconstructor_fuzzer/jsnapiisconstructor_fuzzer.cpp +++ b/test/fuzztest/jsnapiisconstructor_fuzzer/jsnapiisconstructor_fuzzer.cpp @@ -31,7 +31,7 @@ void JSNApiIsConstructorFuzzTest([[maybe_unused]]const uint8_t *data, size_t siz LOG_ECMA(ERROR) << "illegal input!"; return; } - Local intValue = IntegerRef::New(vm_, (int)size); + Local intValue = IntegerRef::New(vm_, *data + (int)size); intValue->IsConstructor(vm_); JSNApi::DestroyJSVM(vm_); } diff --git a/test/fuzztest/jsnapiisfalse_fuzzer/jsnapiisfalse_fuzzer.cpp b/test/fuzztest/jsnapiisfalse_fuzzer/jsnapiisfalse_fuzzer.cpp index 6a13e47156072aa74a0b5c6ddbb55ec3a5b8656a..bcbf9d314a3de84092d902b01b8a40498bfdff29 100644 --- a/test/fuzztest/jsnapiisfalse_fuzzer/jsnapiisfalse_fuzzer.cpp +++ b/test/fuzztest/jsnapiisfalse_fuzzer/jsnapiisfalse_fuzzer.cpp @@ -33,6 +33,8 @@ void JSNApiIsFalseFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) } Local b = JSValueRef::False(vm_); b->IsFalse(); + Local str = StringRef::NewFromUtf8(vm_, (const char *)data); + str->IsFalse(); JSNApi::DestroyJSVM(vm_); } } diff --git a/test/fuzztest/jsnapiisprofiling_fuzzer/jsnapiisprofiling_fuzzer.cpp b/test/fuzztest/jsnapiisprofiling_fuzzer/jsnapiisprofiling_fuzzer.cpp index c775773e0234734ec48088ac791a6a82e3d79df0..cd69768a7b5502725f88b9f0e104524e7e16e310 100644 --- a/test/fuzztest/jsnapiisprofiling_fuzzer/jsnapiisprofiling_fuzzer.cpp +++ b/test/fuzztest/jsnapiisprofiling_fuzzer/jsnapiisprofiling_fuzzer.cpp @@ -32,7 +32,7 @@ void JSNApiIsProfilingFuzztest([[maybe_unused]]const uint8_t *data, size_t size) LOG_ECMA(ERROR) << "illegal input!"; return; } - bool profilerFalg = size % DIVISOR ? true : false; + bool profilerFalg = (*data + size) % DIVISOR ? true : false; vm->SetProfilerState(profilerFalg); JSNApi::IsProfiling(vm); JSNApi::DestroyJSVM(vm); diff --git a/test/fuzztest/jsnapiistrue_fuzzer/jsnapiistrue_fuzzer.cpp b/test/fuzztest/jsnapiistrue_fuzzer/jsnapiistrue_fuzzer.cpp index 2c92b10ebb93c68a7e45094bd733d9d3d72b7407..25838f40abae3da3fd7706f24e14e66497affc1c 100644 --- a/test/fuzztest/jsnapiistrue_fuzzer/jsnapiistrue_fuzzer.cpp +++ b/test/fuzztest/jsnapiistrue_fuzzer/jsnapiistrue_fuzzer.cpp @@ -33,6 +33,8 @@ void JSNApiIsTrueFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) } Local b = JSValueRef::True(vm_); b->IsTrue(); + Local str = StringRef::NewFromUtf8(vm_, (const char *)data); + str->IsTrue(); JSNApi::DestroyJSVM(vm_); } } diff --git a/test/fuzztest/jsnapiset_fuzzer/jsnapiset_fuzzer.cpp b/test/fuzztest/jsnapiset_fuzzer/jsnapiset_fuzzer.cpp index eb51c8491f3c674a4556888b487c2e893919ee1e..709c366cadb88b4c513fda8bbef3f58ed82101a3 100644 --- a/test/fuzztest/jsnapiset_fuzzer/jsnapiset_fuzzer.cpp +++ b/test/fuzztest/jsnapiset_fuzzer/jsnapiset_fuzzer.cpp @@ -31,7 +31,9 @@ void JSNApiSetAssetPathFuzzTest([[maybe_unused]]const uint8_t *data, size_t size if (size <= 0) { return; } - std::string str = "/data/storage/el1/bundle/moduleName/ets/modules.abc"; + std::string str = "/data/storage/el1/bundle/"; + str += std::string((char *)data, size); + str += "/ets/modules.abc"; JSNApi::SetAssetPath(vm, str); JSNApi::DestroyJSVM(vm); } @@ -47,7 +49,7 @@ void JSNApiSetBundleFuzzTest(const uint8_t *data, size_t size) } uint8_t *ptr = nullptr; ptr = const_cast(data); - JSNApi::SetBundle(vm, (bool)size); + JSNApi::SetBundle(vm, (*data & size) > 0 ? true : false); JSNApi::DestroyJSVM(vm); } @@ -65,7 +67,7 @@ void JSNApiSetHostEnqueueJobFuzzTest(const uint8_t *data, size_t size) JSNApi::DestroyJSVM(vm); } -void JSNApiSetMockModuleListFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) +void JSNApiSetMockModuleListFuzzTest(const uint8_t *data, size_t size) { RuntimeOption option; option.SetLogLevel(common::LOG_LEVEL::ERROR); @@ -73,34 +75,18 @@ void JSNApiSetMockModuleListFuzzTest([[maybe_unused]]const uint8_t *data, size_t if (size <= 0) { return; } - std::map str = { { "10", "20" } }; + std::map str = { { (char *)data, "20" } }; JSNApi::SetMockModuleList(vm, str); JSNApi::DestroyJSVM(vm); } - -void JSNApiSetSourceMapTranslateCallbackFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) -{ - RuntimeOption option; - option.SetLogLevel(common::LOG_LEVEL::ERROR); - EcmaVM *vm = JSNApi::CreateJSVM(option); - if (size <= 0) { - return; - } - SourceMapTranslateCallback tag { nullptr }; - JSNApi::SetSourceMapTranslateCallback(vm, tag); - vm->GetSourceMapTranslateCallback(); - JSNApi::DestroyJSVM(vm); -} } // Fuzzer entry point. extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { // Run your code on data. - OHOS::JSNApiSetAssetPathFuzzTest(data, size); OHOS::JSNApiSetBundleFuzzTest(data, size); OHOS::JSNApiSetHostEnqueueJobFuzzTest(data, size); OHOS::JSNApiSetMockModuleListFuzzTest(data, size); - OHOS::JSNApiSetSourceMapTranslateCallbackFuzzTest(data, size); return 0; } \ No newline at end of file diff --git a/test/fuzztest/jsnapitriggergc_fuzzer/jsnapitriggergc_fuzzer.cpp b/test/fuzztest/jsnapitriggergc_fuzzer/jsnapitriggergc_fuzzer.cpp index 805af1a0cd03431c45f89240318ac82c10de4fa8..70e58b354e83f23870f8f0f672b51715f1923bd9 100644 --- a/test/fuzztest/jsnapitriggergc_fuzzer/jsnapitriggergc_fuzzer.cpp +++ b/test/fuzztest/jsnapitriggergc_fuzzer/jsnapitriggergc_fuzzer.cpp @@ -32,10 +32,10 @@ void JSNApiTriggerGCFuzztest([[maybe_unused]]const uint8_t *data, size_t size) LOG_ECMA(ERROR) << "illegal input!"; return; } - if (size % DEFAULT_THREAD_COUNT == 0) { + if ((*data + size) % DEFAULT_THREAD_COUNT == 0) { JSNApi::TRIGGER_GC_TYPE gcType = JSNApi::TRIGGER_GC_TYPE::FULL_GC; JSNApi::TriggerGC(vm, gcType); - } else if (size % DEFAULT_THREAD_COUNT == 1) { + } else if ((*data + size) % DEFAULT_THREAD_COUNT == 1) { JSNApi::TRIGGER_GC_TYPE gcType = JSNApi::TRIGGER_GC_TYPE::OLD_GC; JSNApi::TriggerGC(vm, gcType); } else { diff --git a/test/fuzztest/jsnapivalue_fuzzer/jsnapivalue_fuzzer.cpp b/test/fuzztest/jsnapivalue_fuzzer/jsnapivalue_fuzzer.cpp index b0b53747ae1fcd21e7982d3ae3bd34af71b63bda..a8caa9c111de3c09eefa297c7c1caeea8fe46360 100644 --- a/test/fuzztest/jsnapivalue_fuzzer/jsnapivalue_fuzzer.cpp +++ b/test/fuzztest/jsnapivalue_fuzzer/jsnapivalue_fuzzer.cpp @@ -31,8 +31,8 @@ void JSNApiValueFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) LOG_ECMA(ERROR) << "illegal input!"; return; } - void *vps = static_cast(new std::string("test")); - void *vps1 = static_cast(new std::string("test")); + void *vps = static_cast(const_cast(data)); + void *vps1 = static_cast(const_cast(data)); Local res_vps = NativePointerRef::New(vm_, vps, NativeAreaAllocator::FreeBufferFunc, vps1, 0); res_vps->Value(); JSNApi::DestroyJSVM(vm_); diff --git a/test/resource/js_runtime/ohos_test.xml b/test/resource/js_runtime/ohos_test.xml index 243865138f4f3b093b66e5ee07d490093d28f488..94073aca66fc3c8910365883e477d31ff4d7231b 100755 --- a/test/resource/js_runtime/ohos_test.xml +++ b/test/resource/js_runtime/ohos_test.xml @@ -2026,81 +2026,6 @@