diff --git a/bundle.json b/bundle.json index b0c965533cc7f43f8a787416156061815a64bb28..4b7dae03531dd140bc447514cb82e5b12a3f6200 100644 --- a/bundle.json +++ b/bundle.json @@ -212,7 +212,8 @@ } ], "test": [ - "//foundation/filemanagement/file_api/interfaces/test/unittest:file_api_unittest" + "//foundation/filemanagement/file_api/interfaces/test/unittest:file_api_unittest", + "//foundation/filemanagement/file_api/interfaces/test/fuzztest:file_api_fuzztest" ] } } diff --git a/interfaces/test/fuzztest/BUILD.gn b/interfaces/test/fuzztest/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..99310763499bde15c3a0b630017fa8e8373edda1 --- /dev/null +++ b/interfaces/test/fuzztest/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright (c) 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. +import("//foundation/filemanagement/file_api/file_api.gni") + +group("file_api_fuzztest") { + testonly = true + + deps = [ + "${file_api_path}/interfaces/test/fuzztest/fileio_fuzzer:FileioFuzzTest", + "${file_api_path}/interfaces/test/fuzztest/rustfile_fuzzer:RustFileFuzzTest", + "${file_api_path}/interfaces/test/fuzztest/hyperaio_fuzzer:HyperaioFuzzTest", + ] +} diff --git a/interfaces/test/fuzztest/fileio_fuzzer/BUILD.gn b/interfaces/test/fuzztest/fileio_fuzzer/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..0b4ea42c9f4eb44594e716e6d87518364211f2c6 --- /dev/null +++ b/interfaces/test/fuzztest/fileio_fuzzer/BUILD.gn @@ -0,0 +1,47 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/features.gni") +import("//build/test.gni") +import("//foundation/filemanagement/file_api/file_api.gni") + +ohos_fuzztest("FileioFuzzTest") { + module_out_path = "file_api/file_api" + fuzz_config_file = "${file_api_path}/interfaces/test/fuzztest/fileio_fuzzer" + + include_dirs = [ + "${file_api_path}/interfaces/test/fuzztest/fuzz_common", + "${file_api_path}/interfaces/kits/c/fileio", + ] + + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = [ + "${file_api_path}/interfaces/test/fuzztest/fileio_fuzzer/fileio_fuzzer.cpp", + ] + defines = [] + deps = [ + "${file_api_path}/interfaces/kits/c/fileio:ohfileio", + "${file_api_path}/interfaces/kits/native:fileio_native", + ] + external_deps = [ "c_utils:utils" ] +} + +group("fuzztest") { + testonly = true + deps = [ ":FileioFuzzTest" ] +} diff --git a/interfaces/test/fuzztest/fileio_fuzzer/corpus/init b/interfaces/test/fuzztest/fileio_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..7ade8a0faafeaedba7241e7d4a97b8e1f9691932 --- /dev/null +++ b/interfaces/test/fuzztest/fileio_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/interfaces/test/fuzztest/fileio_fuzzer/fileio_fuzzer.cpp b/interfaces/test/fuzztest/fileio_fuzzer/fileio_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e45e4075724d223df79a9aff7c6dad08b3a7091 --- /dev/null +++ b/interfaces/test/fuzztest/fileio_fuzzer/fileio_fuzzer.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "fileio_fuzzer.h" + +#include "fileio.h" +#include "fileapi_fuzzer_helper.h" + +namespace OHOS { +bool FileioFuzzTest(const uint8_t *data, size_t size) +{ + if ((data == nullptr) || (size < sizeof(int32_t))) { + return false; + } + + FuzzData fuzzData(data, size); + // uriLength + int32_t uriLength = fuzzData.GetData(); + // uri + int len = static_cast(fuzzData.GetRemainSize()); + if (len < uriLength) { + len = uriLength; + } + std::string uriStr = fuzzData.GetStringFromData(len); + // location + int location = 0; + + OH_FileIO_GetFileLocation(const_cast(uriStr.c_str()), uriLength, &location); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + OHOS::FileioFuzzTest(data, size); + return 0; +} diff --git a/interfaces/test/fuzztest/fileio_fuzzer/fileio_fuzzer.h b/interfaces/test/fuzztest/fileio_fuzzer/fileio_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..40606a76ef14de106db6ce859d0bb336aa2d07ff --- /dev/null +++ b/interfaces/test/fuzztest/fileio_fuzzer/fileio_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FILEIO_FUZZER_H +#define FILEIO_FUZZER_H + +#define FUZZ_PROJECT_NAME "fileio_fuzzer" + +#endif \ No newline at end of file diff --git a/interfaces/test/fuzztest/fileio_fuzzer/project.xml b/interfaces/test/fuzztest/fileio_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..8cd958170c96fc8fbad21fc1becdb23a91a9cd26 --- /dev/null +++ b/interfaces/test/fuzztest/fileio_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/interfaces/test/fuzztest/fuzz_common/fileapi_fuzzer_helper.h b/interfaces/test/fuzztest/fuzz_common/fileapi_fuzzer_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..c82491be9f73abce3814f79bf0fe8be52d902fcc --- /dev/null +++ b/interfaces/test/fuzztest/fuzz_common/fileapi_fuzzer_helper.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FILEAPI_FUZZER_HELPER_H +#define FILEAPI_FUZZER_HELPER_H + +#include "securec.h" +#include + +namespace OHOS { +class FuzzData { +public: + FuzzData(const uint8_t *data, size_t size) + { + baseData = data; + baseSize = size; + } + + void ResetData(size_t newSize) + { + if (newSize <= baseSize) { + baseSize = newSize; + } + basePos = 0; + } + + template + T GetData() + { + T object{}; + size_t objectSize = sizeof(object); + if (baseData == nullptr || objectSize > baseSize - basePos) { + return object; + } + if (memcpy_s(&object, objectSize, baseData + basePos, objectSize) != EOK) { + return {}; + } + basePos = basePos + objectSize; + return object; + } + + size_t GetRemainSize() const + { + return baseSize - basePos; + } + + std::string GetStringFromData(int len) + { + if (len <= 0 || baseData == nullptr || basePos >= baseSize) { + return ""; + } + + std::string cstr; + for (int i = 0; i < len; ++i) { + if (basePos >= baseSize) { + basePos = 0; + } + char tmp = GetData(); + if (tmp == '\0') { + cstr.push_back('1'); + } else { + cstr.push_back(tmp); + } + } + return cstr; + } + +private: + const uint8_t *baseData{nullptr}; + size_t baseSize{0}; + size_t basePos{0}; +}; +} // namespace OHOS +#endif // FILEAPI_FUZZER_HELPER_H diff --git a/interfaces/test/fuzztest/hyperaio_fuzzer/BUILD.gn b/interfaces/test/fuzztest/hyperaio_fuzzer/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..73f9f489bded911c1d05ce76eba87296d213006f --- /dev/null +++ b/interfaces/test/fuzztest/hyperaio_fuzzer/BUILD.gn @@ -0,0 +1,60 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/features.gni") +import("//build/test.gni") +import("//foundation/filemanagement/file_api/file_api.gni") + +ohos_fuzztest("HyperaioFuzzTest") { + module_out_path = "file_api/file_api" + fuzz_config_file = "${file_api_path}/interfaces/test/fuzztest/hyperaio_fuzzer" + file_api_feature_hyperaio = true + + include_dirs = [ + "${file_api_path}/interfaces/test/fuzztest/fuzz_common", + "${file_api_path}/interfaces/kits/hyperaio/include", + ] + + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = + [ "${file_api_path}/interfaces/test/fuzztest/hyperaio_fuzzer/hyperaio_fuzzer.cpp" ] + defines = [] + deps = [ + "${file_api_path}/interfaces/kits/hyperaio:HyperAio", + ] + + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_core", + "access_token:libaccesstoken_sdk", + "hitrace:hitrace_meter", + ] + if (file_api_feature_hyperaio) { + external_deps += [ "liburing:liburing" ] + } + + if (file_api_feature_hyperaio) { + defines += [ "HYPERAIO_USE_LIBURING" ] + } +} + +group("fuzztest") { + testonly = true + deps = [ ":HyperaioFuzzTest" ] +} diff --git a/interfaces/test/fuzztest/hyperaio_fuzzer/corpus/init b/interfaces/test/fuzztest/hyperaio_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..7ade8a0faafeaedba7241e7d4a97b8e1f9691932 --- /dev/null +++ b/interfaces/test/fuzztest/hyperaio_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/interfaces/test/fuzztest/hyperaio_fuzzer/hyperaio_fuzzer.cpp b/interfaces/test/fuzztest/hyperaio_fuzzer/hyperaio_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0298c996667de6835df60a5245e768c927df7bf5 --- /dev/null +++ b/interfaces/test/fuzztest/hyperaio_fuzzer/hyperaio_fuzzer.cpp @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "hyperaio_fuzzer.h" + +#include +#include "hyperaio.h" +#include "fileapi_fuzzer_helper.h" + +namespace OHOS { +std::function)> callBack = [](std::unique_ptr response) {}; + +bool HyperaioStartOpenReqsFuzzTest(const uint8_t *data, size_t size) +{ + if ((data == nullptr) || (size < sizeof(int32_t))) { + return false; + } + + std::unique_ptr hyperAio_ = std::make_unique(); + hyperAio_->CtxInit(&callBack); + + FuzzData fuzzData(data, size); + // userData + int32_t userData = fuzzData.GetData(); + + OHOS::HyperAio::OpenInfo openInfo = {0, O_RDWR, 0, nullptr, userData}; + OHOS::HyperAio::OpenReqs openReqs = {1, &openInfo}; + + hyperAio_->StartOpenReqs(&openReqs); + hyperAio_->DestroyCtx(); + + return true; +} + +bool HyperaioStartOpenReqsBatchFuzzTest(const uint8_t *data, size_t size) +{ + if ((data == nullptr) || (size < sizeof(int32_t))) { + return false; + } + + std::unique_ptr hyperAio_ = std::make_unique(); + hyperAio_->CtxInit(&callBack); + + FuzzData fuzzData(data, size); + // userData + int32_t userData = fuzzData.GetData(); + int32_t batchSize = fuzzData.GetData(); + + OHOS::HyperAio::OpenInfo openInfo = {0, O_RDWR, 0, nullptr, userData}; + OHOS::HyperAio::OpenReqs openReqs = {batchSize, &openInfo}; + + hyperAio_->StartOpenReqs(&openReqs); + hyperAio_->DestroyCtx(); + + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ +#ifdef HYPERAIO_USE_LIBURING + /* Run your code on data */ + OHOS::HyperaioStartOpenReqsFuzzTest(data, size); + OHOS::HyperaioStartOpenReqsBatchFuzzTest(data, size); +#endif + return 0; +} diff --git a/interfaces/test/fuzztest/hyperaio_fuzzer/hyperaio_fuzzer.h b/interfaces/test/fuzztest/hyperaio_fuzzer/hyperaio_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..990c437c6701e92209fe06567e3c786f9b88f1a9 --- /dev/null +++ b/interfaces/test/fuzztest/hyperaio_fuzzer/hyperaio_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef HYPERAIO_FUZZER_H +#define HYPERAIO_FUZZER_H + +#define FUZZ_PROJECT_NAME "hyperaio_fuzzer" + +#endif \ No newline at end of file diff --git a/interfaces/test/fuzztest/hyperaio_fuzzer/project.xml b/interfaces/test/fuzztest/hyperaio_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..8cd958170c96fc8fbad21fc1becdb23a91a9cd26 --- /dev/null +++ b/interfaces/test/fuzztest/hyperaio_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/interfaces/test/fuzztest/rustfile_fuzzer/BUILD.gn b/interfaces/test/fuzztest/rustfile_fuzzer/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..eb898d747b2a7f4666343da848035a5307fd4d0c --- /dev/null +++ b/interfaces/test/fuzztest/rustfile_fuzzer/BUILD.gn @@ -0,0 +1,43 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/features.gni") +import("//build/test.gni") +import("//foundation/filemanagement/file_api/file_api.gni") + +ohos_fuzztest("RustFileFuzzTest") { + module_out_path = "file_api/file_api" + fuzz_config_file = "${file_api_path}/interfaces/test/fuzztest/rustfile_fuzzer" + + include_dirs = [ + "${file_api_path}/interfaces/test/fuzztest/fuzz_common", + "${file_api_path}/interfaces/kits/rust/include", + ] + + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = [ "${file_api_path}/interfaces/test/fuzztest/rustfile_fuzzer/rustfile_fuzzer.cpp" ] + defines = [] + deps = [ "${file_api_path}/interfaces/kits/rust:rust_file" ] + + external_deps = [ "c_utils:utils" ] +} + +group("fuzztest") { + testonly = true + deps = [ ":RustFileFuzzTest" ] +} diff --git a/interfaces/test/fuzztest/rustfile_fuzzer/corpus/init b/interfaces/test/fuzztest/rustfile_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..7ade8a0faafeaedba7241e7d4a97b8e1f9691932 --- /dev/null +++ b/interfaces/test/fuzztest/rustfile_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/interfaces/test/fuzztest/rustfile_fuzzer/project.xml b/interfaces/test/fuzztest/rustfile_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..8cd958170c96fc8fbad21fc1becdb23a91a9cd26 --- /dev/null +++ b/interfaces/test/fuzztest/rustfile_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/interfaces/test/fuzztest/rustfile_fuzzer/rustfile_fuzzer.cpp b/interfaces/test/fuzztest/rustfile_fuzzer/rustfile_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2708fd57eae4b65e72de04b11edb5c2c1a51ed07 --- /dev/null +++ b/interfaces/test/fuzztest/rustfile_fuzzer/rustfile_fuzzer.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "rustfile_fuzzer.h" + +#include +#include "fileapi_fuzzer_helper.h" +#include "rust_file.h" + +namespace OHOS { +bool ReaderIteratorFuzzTest(const uint8_t *data, size_t size) +{ + if ((data == nullptr) || (size < sizeof(int32_t))) { + return false; + } + + FuzzData fuzzData(data, size); + int len = static_cast(fuzzData.GetRemainSize()); + std::string path = fuzzData.GetStringFromData(len); + + ReaderIterator(const_cast(path.c_str())); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + OHOS::ReaderIteratorFuzzTest(data, size); + return 0; +} diff --git a/interfaces/test/fuzztest/rustfile_fuzzer/rustfile_fuzzer.h b/interfaces/test/fuzztest/rustfile_fuzzer/rustfile_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..0a37dfe6a2a3616738af69ca79c58c5eeb07f07a --- /dev/null +++ b/interfaces/test/fuzztest/rustfile_fuzzer/rustfile_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef RUSTFILE_FUZZER_H +#define RUSTFILE_FUZZER_H + +#define FUZZ_PROJECT_NAME "rustfile_fuzzer" + +#endif \ No newline at end of file