From b0c5ce98c9adde9016968ac549fe66a567936fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=AB=E5=BF=B5?= Date: Sat, 10 May 2025 18:37:53 +0800 Subject: [PATCH 1/4] 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 别念 --- interfaces/kits/hyperaio/include/hyperaio.h | 2 +- interfaces/kits/hyperaio/include/libhilog.h | 8 ++++---- interfaces/kits/hyperaio/src/hyperaio.cpp | 10 ++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/interfaces/kits/hyperaio/include/hyperaio.h b/interfaces/kits/hyperaio/include/hyperaio.h index b4fd06b38..b950ddc86 100644 --- a/interfaces/kits/hyperaio/include/hyperaio.h +++ b/interfaces/kits/hyperaio/include/hyperaio.h @@ -22,7 +22,7 @@ namespace OHOS { namespace HyperAio { -#define IOURING_APP_PERMISSION (1U << 0) +#define HYPERAIO_APP_PERMISSION (1U << 0) #ifndef EOK #define EOK (0) #endif diff --git a/interfaces/kits/hyperaio/include/libhilog.h b/interfaces/kits/hyperaio/include/libhilog.h index 9e882f46b..91c7c0943 100644 --- a/interfaces/kits/hyperaio/include/libhilog.h +++ b/interfaces/kits/hyperaio/include/libhilog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * 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 @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef FILEMGMT_LIBHILOG_H -#define FILEMGMT_LIBHILOG_H +#ifndef HYPERAIO_LIBHILOG_H +#define HYPERAIO_LIBHILOG_H #include "hilog/log.h" @@ -26,7 +26,7 @@ namespace OHOS { #endif #ifndef LOG_TAG -#define LOG_TAG "FileManagement" +#define LOG_TAG "HyperAio" #endif #if defined __FILE_NAME__ diff --git a/interfaces/kits/hyperaio/src/hyperaio.cpp b/interfaces/kits/hyperaio/src/hyperaio.cpp index 70f424b5c..95d96e87e 100644 --- a/interfaces/kits/hyperaio/src/hyperaio.cpp +++ b/interfaces/kits/hyperaio/src/hyperaio.cpp @@ -44,7 +44,7 @@ uint32_t HyperAio::SupportIouring() { uint32_t flags = 0; if (HasAccessIouringPermission()) { - flags |= IOURING_APP_PERMISSION; + flags |= HYERAIO_APP_PERMISSION; } return flags; } @@ -93,7 +93,7 @@ int32_t HyperAio::StartOpenReqs(OpenReqs *req) } uint32_t totalReqs = req->reqNum; uint32_t count = 0; - for(uint32_t i = 0; i < totalReqs; i++){ + for (uint32_t i = 0; i < totalReqs; i++) { struct io_uring_sqe *sqe = GetSqeWithRetry(&uring_); if (sqe == nullptr) { HILOGE("get sqe failed"); @@ -134,8 +134,7 @@ int32_t HyperAio::StartReadReqs(ReadReqs *req) } uint32_t totalReqs = req->reqNum; uint32_t count = 0; - for(uint32_t i = 0; i < totalReqs; i++) - { + for (uint32_t i = 0; i < totalReqs; i++) { struct io_uring_sqe *sqe = GetSqeWithRetry(&uring_); if (sqe == nullptr) { HILOGE("get sqe failed"); @@ -175,8 +174,7 @@ int32_t HyperAio::StartCancelReqs(CancelReqs *req) } uint32_t totalReqs = req->reqNum; uint32_t count = 0; - for(uint32_t i = 0; i < totalReqs; i++) - { + for (uint32_t i = 0; i < totalReqs; i++) { struct io_uring_sqe *sqe = GetSqeWithRetry(&uring_); if (sqe == nullptr) { HILOGE("get sqe failed"); -- Gitee From 0d3a48830c7eb1998d4d833a86ea3e2e33716478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=AB=E5=BF=B5?= Date: Sun, 11 May 2025 17:39:53 +0800 Subject: [PATCH 2/4] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 别念 --- interfaces/kits/hyperaio/BUILD.gn | 2 +- interfaces/kits/hyperaio/include/libhilog.h | 49 +++- interfaces/test/unittest/hyperaio/BUILD.gn | 41 +++ .../test/unittest/hyperaio/hyperaio_test.cpp | 260 ++++++++++++++++++ 4 files changed, 337 insertions(+), 15 deletions(-) create mode 100644 interfaces/test/unittest/hyperaio/BUILD.gn create mode 100644 interfaces/test/unittest/hyperaio/hyperaio_test.cpp diff --git a/interfaces/kits/hyperaio/BUILD.gn b/interfaces/kits/hyperaio/BUILD.gn index 5a35a775c..0ac7313ef 100644 --- a/interfaces/kits/hyperaio/BUILD.gn +++ b/interfaces/kits/hyperaio/BUILD.gn @@ -61,7 +61,7 @@ ohos_shared_library("HyperAio") { "access_token:libaccesstoken_sdk" ] - innerapi_tags = [ "platformsdk" ] + install_images = [ "system" ] part_name = "file_api" subsystem_name = "filemanagement" } \ No newline at end of file diff --git a/interfaces/kits/hyperaio/include/libhilog.h b/interfaces/kits/hyperaio/include/libhilog.h index 91c7c0943..f4f81721d 100644 --- a/interfaces/kits/hyperaio/include/libhilog.h +++ b/interfaces/kits/hyperaio/include/libhilog.h @@ -21,36 +21,57 @@ #include namespace OHOS { -#ifndef LOG_DOMAIN -#define LOG_DOMAIN 0xD001600 -#endif - -#ifndef LOG_TAG -#define LOG_TAG "HyperAio" -#endif +namespace HyperAio { #if defined __FILE_NAME__ #define FILEMGMT_FILE_NAME __FILE_NAME__ #else -#include #define FILEMGMT_FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #endif +#ifndef HYPERAIO_LOG_DOMAIN +#define HYPERAIO_LOG_DOMAIN 0xD004388 +#endif + +#undef HYPERAIO_LOG_TAG +#define HYPERAIO_LOG_TAG "hyperaio" + +#ifdef HILOGD +#undef HILOGD +#endif + +#ifdef HILOGF +#undef HILOGF +#endif + +#ifdef HILOGE +#undef HILOGE +#endif + +#ifdef HILOGW +#undef HILOGW +#endif + +#ifdef HILOGI +#undef HILOGI +#endif + #define HILOGF(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_FATAL, LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_FATAL, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGE(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_ERROR, LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_ERROR, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGW(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_WARN, LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_WARN, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGI(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_INFO, LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_INFO, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGD(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_DEBUG, LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_DEBUG, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) +} // namespace HyperAio } // namespace OHOS -#endif // FILEMGMT_LIBHILOG_H \ No newline at end of file +#endif // HYPERAIO_LIBHILOG_H \ No newline at end of file diff --git a/interfaces/test/unittest/hyperaio/BUILD.gn b/interfaces/test/unittest/hyperaio/BUILD.gn new file mode 100644 index 000000000..0a7a58c87 --- /dev/null +++ b/interfaces/test/unittest/hyperaio/BUILD.gn @@ -0,0 +1,41 @@ +# 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/test.gni") +import("//foundation/filemanagement/file_api/file_api.gni") + +ohos_unittest("hyperaio_test") { + module_out_path = "file_api/file_api" + + resource_config_file = "../resource/ohos_test.xml" + + sources = [ "hyperaio_test.cpp" ] + + include_dirs = [ + "include", + "${file_api_path}/interfaces/kits/hyperaio/include", + ] + + deps = [ + "${file_api_path}/interfaces/kits/hyperaio:HyperAio", + ] + + external_deps = [ + "access_token:libaccesstoken_sdk", + "c_utils:utils", + "c_utils:utilsbase", + "ipc:ipc_core", + "googletest:gtest_main", + "liburing:liburing", + ] +} diff --git a/interfaces/test/unittest/hyperaio/hyperaio_test.cpp b/interfaces/test/unittest/hyperaio/hyperaio_test.cpp new file mode 100644 index 000000000..4ae580af6 --- /dev/null +++ b/interfaces/test/unittest/hyperaio/hyperaio_test.cpp @@ -0,0 +1,260 @@ +/* + * 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 +#include +#include +#include + +#include "hyperaio.h" + +namespace { + using namespace std; + using namespace OHOS::HyperAio; + const uint64_t userData = 12345; + const uint32_t len = 1024; + class HyperAioTest : public testing::Test { + public: + static void SetUpTestCase(void) {}; + static void TearDownTestCase() {}; + void SetUp() {}; + void TearDown() {}; + }; + std::function)> callBack = [](std::unique_ptr response) { + GTEST_LOG_(INFO) << "HyperAioTest callBack"; + } + + /** + * @tc.name: HyperAio_StartOpenReqs_0000 + * @tc.desc: Test function of StartOpenReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartOpenReqs_0000, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartOpenReqs_0000"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + result = hyperAio_->CtxInit(nullptr); + EXPECT_EQ(result, -EINVAL); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartOpenReqs_0000"; + } + + /** + * @tc.name: HyperAio_StartOpenReqs_0001 + * @tc.desc: Test function of StartOpenReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartOpenReqs_0001, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartOpenReqs_0001"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + result = hyperAio_->CtxInit(&callBack); + EXPECT_EQ(result, 0); + OpenInfo openInfo = {0, O_RDWR, 0, nullptr, userData}; + OpenReqs openReqs = {1, &openInfo}; + result = hyperAio_->StartOpenReqs(&openReqs); + EXPECT_EQ(result, 0); + result = hyperAio_->DestroyCtx(); + EXPECT_EQ(result, 0); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartOpenReqs_0001"; + } + + /** + * @tc.name: HyperAio_StartOpenReqs_0002 + * @tc.desc: Test function of StartOpenReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartOpenReqs_0002, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartOpenReqs_0002"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + OpenInfo openInfo = {0, O_RDWR, 0, nullptr, userData}; + OpenReqs openReqs = {1, &openInfo}; + result = hyperAio_->StartOpenReqs(&openReqs); + EXPECT_EQ(result, -EPERM); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartOpenReqs_0002"; + } + + /** + * @tc.name: HyperAio_StartReadReqs_0000 + * @tc.desc: Test function of StartReadReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartReadReqs_0000, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartReadReqs_0000"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + result = hyperAio_->CtxInit(nullptr); + EXPECT_EQ(result, -EINVAL); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartReadReqs_0000"; + } + + /** + * @tc.name: HyperAio_StartReadReqs_0001 + * @tc.desc: Test function of StartReadReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartReadReqs_0001, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartReadReqs_0001"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + result = hyperAio_->CtxInit(&callBack); + EXPECT_EQ(result, 0); + ReadInfo readInfo = {0, len, 0, nullptr, userData}; + ReadReqs readReqs = {1, &readInfo}; + result = hyperAio_->StartReadReqs(&readReqs); + EXPECT_EQ(result, 0); + result = hyperAio_->DestroyCtx(); + EXPECT_EQ(result, 0); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartReadReqs_0001"; + } + + /** + * @tc.name: HyperAio_StartReadReqs_0002 + * @tc.desc: Test function of StartReadReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartReadReqs_0002, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartReadReqs_0002"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + ReadInfo readInfo = {0, len, 0, nullptr, userData}; + ReadReqs readReqs = {1, &readInfo}; + result = hyperAio_->StartReadReqs(&readReqs); + EXPECT_EQ(result, -EPERM); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartReadReqs_0002"; + } + + /** + * @tc.name: HyperAio_StartCancelReqs_0000 + * @tc.desc: Test function of StartCancelReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartCancelReqs_0000, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartCancelReqs_0000"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + result = hyperAio_->CtxInit(nullptr); + EXPECT_EQ(result, -EINVAL); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartCancelReqs_0000"; + } + + /** + * @tc.name: HyperAio_StartCancelReqs_0001 + * @tc.desc: Test function of StartCancelReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartCancelReqs_0001, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartCancelReqs_0001"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + result = hyperAio_->CtxInit(&callBack); + EXPECT_EQ(result, 0); + CancelInfo cancelInfo = {userData, 0}; + CancelReqs cancelReqs = {1, &cancelInfo}; + result = hyperAio_->StartCancelReqs(&cancelReqs); + EXPECT_EQ(result, 0); + result = hyperAio_->DestroyCtx(); + EXPECT_EQ(result, 0); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartCancelReqs_0001"; + } + + /** + * @tc.name: HyperAio_StartCancelReqs_0002 + * @tc.desc: Test function of StartCancelReqs() interface for SUCCESS. + * @tc.size: MEDIUM + * @tc.type: FUNC + * @tc.level Level 1 + * @tc.require: AR000HG8M4 + */ + HWTEST_F(HyperAioTest, HyperAio_StartCancelReqs_0002, testing::ext::TestSize.Level1) + { + GTEST_LOG_(INFO) << "HyperAioTest-begin HyperAio_StartCancelReqs_0002"; + std::unique_ptr hyperAio_ = std::make_unique(); + int32_t result = hyperAio_->SupportIouring(); + EXPECT_EQ((result & IOURING_APP_PERMISSION) == 0, true); + if ((result & IOURING_APP_PERMISSION) == 0) { + return; + } + CancelInfo cancelInfo = {userData, 0}; + CancelReqs cancelReqs = {1, &cancelInfo}; + result = hyperAio_->StartCancelReqs(&cancelReqs); + EXPECT_EQ(result, -EPERM); + GTEST_LOG_(INFO) << "HyperAioTest-end HyperAio_StartCancelReqs_0002"; + } +} -- Gitee From 35d9f42f12e61c0ff13e77c695074167f1f3d4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=AB=E5=BF=B5?= Date: Sun, 11 May 2025 17:44:43 +0800 Subject: [PATCH 3/4] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 别念 --- interfaces/test/unittest/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/interfaces/test/unittest/BUILD.gn b/interfaces/test/unittest/BUILD.gn index 95f924b84..b14741b2d 100644 --- a/interfaces/test/unittest/BUILD.gn +++ b/interfaces/test/unittest/BUILD.gn @@ -18,5 +18,6 @@ group("unittest") { "filemgmt_libn_test:filemgmt_libn_test", "remote_uri:remote_uri_test", "task_signal:task_signal_test", + "hyperaio:hyperaio_test" ] } -- Gitee From 63d672d36f5ef15d55d62d06da4281985d4a5bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=AB=E5=BF=B5?= Date: Mon, 12 May 2025 09:26:14 +0800 Subject: [PATCH 4/4] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 别念 --- interfaces/kits/hyperaio/include/libhilog.h | 10 +++++----- interfaces/test/unittest/hyperaio/hyperaio_test.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/interfaces/kits/hyperaio/include/libhilog.h b/interfaces/kits/hyperaio/include/libhilog.h index f4f81721d..3535112a2 100644 --- a/interfaces/kits/hyperaio/include/libhilog.h +++ b/interfaces/kits/hyperaio/include/libhilog.h @@ -57,19 +57,19 @@ namespace HyperAio { #endif #define HILOGF(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_FATAL, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_FATAL, HYPERAIO_LOG_DOMAIN, HYPERAIO_LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGE(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_ERROR, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_ERROR, HYPERAIO_LOG_DOMAIN, HYPERAIO_LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGW(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_WARN, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_WARN, HYPERAIO_LOG_DOMAIN, HYPERAIO_LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGI(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_INFO, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_INFO, HYPERAIO_LOG_DOMAIN, HYPERAIO_LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) #define HILOGD(fmt, ...) \ - ((void)HILOG_IMPL(LOG_CORE, LOG_DEBUG, HYPERAIO_LOG_DOMAIN, LOG_TAG, \ + ((void)HILOG_IMPL(LOG_CORE, LOG_DEBUG, HYPERAIO_LOG_DOMAIN, HYPERAIO_LOG_TAG, \ "[%{public}s:%{public}d->%{public}s] " fmt, FILEMGMT_FILE_NAME, __LINE__, __FUNCTION__, ##__VA_ARGS__)) } // namespace HyperAio } // namespace OHOS diff --git a/interfaces/test/unittest/hyperaio/hyperaio_test.cpp b/interfaces/test/unittest/hyperaio/hyperaio_test.cpp index 4ae580af6..43569a16d 100644 --- a/interfaces/test/unittest/hyperaio/hyperaio_test.cpp +++ b/interfaces/test/unittest/hyperaio/hyperaio_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * 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 @@ -34,7 +34,7 @@ namespace { }; std::function)> callBack = [](std::unique_ptr response) { GTEST_LOG_(INFO) << "HyperAioTest callBack"; - } + }; /** * @tc.name: HyperAio_StartOpenReqs_0000 -- Gitee