diff --git a/adapter/uhdf2/ipc/src/hdf_remote_adapter.cpp b/adapter/uhdf2/ipc/src/hdf_remote_adapter.cpp index a29a9f290ac2eb2bb2214576596fbfd0705cd607..4b7afe7d1e3a610431b412f7bfe5c218d9490981 100644 --- a/adapter/uhdf2/ipc/src/hdf_remote_adapter.cpp +++ b/adapter/uhdf2/ipc/src/hdf_remote_adapter.cpp @@ -37,6 +37,7 @@ HdfRemoteServiceStub::HdfRemoteServiceStub(struct HdfRemoteService *service) { } +// LCOV_EXCL_START int HdfRemoteServiceStub::OnRemoteRequest(uint32_t code, OHOS::MessageParcel &data, OHOS::MessageParcel &reply, OHOS::MessageOption &option) { @@ -65,6 +66,7 @@ int HdfRemoteServiceStub::OnRemoteRequest(uint32_t code, HdfSbufRecycle(replySbuf); return ret; } +// LCOV_EXCL_STOP void HdfRemoteServiceStub::HdfRemoteStubClearHolder() { @@ -191,6 +193,7 @@ void HdfRemoteAdapterAddDeathRecipient( remote->AddDeathRecipient(holder->deathRecipient_); } +// LCOV_EXCL_START void HdfRemoteAdapterRemoveDeathRecipient( struct HdfRemoteService *service, const struct HdfDeathRecipient *recipient) { @@ -208,6 +211,7 @@ void HdfRemoteAdapterRemoveDeathRecipient( holder->deathRecipient_ = nullptr; } } +// LCOV_EXCL_STOP struct HdfRemoteService *HdfRemoteAdapterBind(OHOS::sptr binder) { diff --git a/adapter/uhdf2/ipc/src/hdf_sbuf_impl_hipc.cpp b/adapter/uhdf2/ipc/src/hdf_sbuf_impl_hipc.cpp index b926a7e44de45f3a74e2ffb720fa6c481d4e2ae0..c8966f6b2192316f51228574583736e3692a7093 100644 --- a/adapter/uhdf2/ipc/src/hdf_sbuf_impl_hipc.cpp +++ b/adapter/uhdf2/ipc/src/hdf_sbuf_impl_hipc.cpp @@ -58,6 +58,7 @@ static bool SbufMParcelImplWriteBuffer(struct HdfSBufImpl *sbuf, const uint8_t * return parcel->WriteUnpadBuffer(static_cast(data), writeSize); } +// LCOV_EXCL_START static bool SbufMParcelImplWriteUnpadBuffer(struct HdfSBufImpl *sbuf, const uint8_t *data, uint32_t writeSize) { return MParcelCast(sbuf)->WriteUnpadBuffer(static_cast(data), writeSize); @@ -67,12 +68,14 @@ static bool SbufMParcelImplWriteUint64(struct HdfSBufImpl *sbuf, uint64_t value) { return MParcelCast(sbuf)->WriteUint64(value); } +// LCOV_EXCL_STOP static bool SbufMParcelImplWriteUint32(struct HdfSBufImpl *sbuf, uint32_t value) { return MParcelCast(sbuf)->WriteUint32(value); } +// LCOV_EXCL_START static bool SbufMParcelImplWriteUint16(struct HdfSBufImpl *sbuf, uint16_t value) { return MParcelCast(sbuf)->WriteUint16(value); @@ -87,6 +90,7 @@ static bool SbufMParcelImplWriteInt64(struct HdfSBufImpl *sbuf, int64_t value) { return MParcelCast(sbuf)->WriteInt64(value); } +// LCOV_EXCL_STOP static bool SbufMParcelImplWriteInt32(struct HdfSBufImpl *sbuf, int32_t value) { @@ -108,6 +112,7 @@ static bool SbufMParcelImplWriteString(struct HdfSBufImpl *sbuf, const char *val return MParcelCast(sbuf)->WriteCString(value); } +// LCOV_EXCL_START static bool SbufMParcelImplWriteString16(struct HdfSBufImpl *sbuf, const char16_t *value, uint32_t size) { return MParcelCast(sbuf)->WriteString16WithLength(value, size); @@ -181,6 +186,7 @@ static bool SbufMParcelImplReadUint64(struct HdfSBufImpl *sbuf, uint64_t *value) *value = v; return ret; } +// LCOV_EXCL_STOP static bool SbufMParcelImplReadUint32(struct HdfSBufImpl *sbuf, uint32_t *value) { @@ -264,6 +270,7 @@ static const char *SbufMParcelImplReadString(struct HdfSBufImpl *sbuf) return MParcelCast(sbuf)->ReadCString(); } +// LCOV_EXCL_START static const char16_t *SbufMParcelImplReadString16(struct HdfSBufImpl *sbuf) { SBufMParcelImpl *sbufImpl = reinterpret_cast(sbuf); @@ -280,6 +287,7 @@ static int32_t SbufMParcelImplWriteRemoteService(struct HdfSBufImpl *sbuf, const const struct HdfRemoteServiceHolder *holder = reinterpret_cast(service); return parcel->WriteRemoteObject(holder->remote_) ? HDF_SUCCESS : HDF_FAILURE; } +// LCOV_EXCL_STOP static struct HdfRemoteService *SbufMParcelImplReadRemoteService(struct HdfSBufImpl *sbuf) { diff --git a/adapter/uhdf2/manager/src/devmgr_service_stub.c b/adapter/uhdf2/manager/src/devmgr_service_stub.c index dc826d13fc68d11f624bfb18291964ab432969a9..8c115c4eb917e39045f87e49c114f30793d30442 100644 --- a/adapter/uhdf2/manager/src/devmgr_service_stub.c +++ b/adapter/uhdf2/manager/src/devmgr_service_stub.c @@ -129,6 +129,7 @@ static int32_t DevmgrServiceStubDispatchListAllDevice(struct IDevmgrService *dev return devmgrSvc->ListAllDevice(devmgrSvc, reply); } +// LCOV_EXCL_START static int32_t DevmgrServiceStubListAllHost(struct IDevmgrService *devmgrSvc, struct HdfSBuf *reply) { if (reply == NULL) { @@ -148,6 +149,7 @@ static int32_t DevmgrServiceStubListAllHost(struct IDevmgrService *devmgrSvc, st } return HDF_SUCCESS; } +// LCOV_EXCL_STOP int32_t DevmgrServiceStubDispatch(struct HdfRemoteService *stub, int code, struct HdfSBuf *data, struct HdfSBuf *reply) { @@ -198,6 +200,7 @@ int32_t DevmgrServiceStubDispatch(struct HdfRemoteService *stub, int code, struc return HDF_SUCCESS; } +// LCOV_EXCL_START static void RemoveModule(const char *module) { uint32_t flags = O_NONBLOCK | O_EXCL; @@ -270,6 +273,7 @@ static int32_t ModuleSysEventHandle( return ret; } +// LCOV_EXCL_STOP static int32_t DriverModuleLoadHelperInit(void) { diff --git a/framework/support/posix/src/osal_sem.c b/framework/support/posix/src/osal_sem.c index 3514616a929bd1d24bc1db903133b474049ee0b0..513e6326d6b19a28ef59b619c2353e25545317a7 100644 --- a/framework/support/posix/src/osal_sem.c +++ b/framework/support/posix/src/osal_sem.c @@ -45,6 +45,7 @@ int32_t OsalSemInit(struct OsalSem *sem, uint32_t value) return HDF_SUCCESS; } +// LCOV_EXCL_START int32_t OsalSemWait(struct OsalSem *sem, uint32_t ms) { if (sem == NULL || sem->realSemaphore == NULL) { @@ -113,4 +114,4 @@ int32_t OsalSemDestroy(struct OsalSem *sem) return HDF_SUCCESS; } - +// LCOV_EXCL_STOP diff --git a/framework/support/posix/src/osal_spinlock.c b/framework/support/posix/src/osal_spinlock.c index 6980d231fd404e79a29aa526366a3b040c1120b4..239577b344068b81175218abade47a4182b7f7d1 100644 --- a/framework/support/posix/src/osal_spinlock.c +++ b/framework/support/posix/src/osal_spinlock.c @@ -13,6 +13,7 @@ #define HDF_LOG_TAG osal_spinlock +// LCOV_EXCL_START int32_t OsalSpinInit(OsalSpinlock *spinlock) { pthread_spinlock_t *spinTmp = NULL; @@ -98,4 +99,4 @@ int32_t OsalSpinUnlock(OsalSpinlock *spinlock) return HDF_SUCCESS; } - +// LCOV_EXCL_STOP diff --git a/framework/support/posix/src/osal_time.c b/framework/support/posix/src/osal_time.c index 49bf71606fe56a7db7d8eccf8d955b7079b83cb6..635d2ba27634b74fbe9ea14add5fdb10eaa2cb98 100644 --- a/framework/support/posix/src/osal_time.c +++ b/framework/support/posix/src/osal_time.c @@ -16,6 +16,7 @@ #define HDF_LOG_TAG osal_time +// LCOV_EXCL_START int32_t OsalGetTime(OsalTimespec *time) { struct timespec ts; @@ -67,6 +68,7 @@ void OsalSleep(uint32_t sec) { sleep(sec); } +// LCOV_EXCL_STOP void OsalMSleep(uint32_t ms) { diff --git a/framework/utils/src/hcs_parser/hcs_blob_if.c b/framework/utils/src/hcs_parser/hcs_blob_if.c index e5c64a98019a6a24de663e9c02af49a0c12673e1..e645c3265eb567f8d6a1303db76009cece0e45d9 100644 --- a/framework/utils/src/hcs_parser/hcs_blob_if.c +++ b/framework/utils/src/hcs_parser/hcs_blob_if.c @@ -155,6 +155,7 @@ bool HcsSwapToUint32(uint32_t *value, const char *realValue, uint32_t type) return false; } +// LCOV_EXCL_START bool HcsSwapToUint64(uint64_t *value, const char *realValue, uint32_t type) { uint32_t data; @@ -169,6 +170,7 @@ bool HcsSwapToUint64(uint64_t *value, const char *realValue, uint32_t type) HDF_LOGE("%{public}s failed, type: %{public}u", __func__, type); return false; } +// LCOV_EXCL_STOP static bool CheckHcsBlobLength(uint32_t length, struct HbcHeader *header) {