LCOV - code coverage report
Current view: top level - stub - stub_tsd_event_client.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 24 24
Test Date: 2026-08-12 11:05:07 Functions: 100.0 % 9 9

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2025 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : 
      11              : #include "tsd.h"
      12              : #include <iostream>
      13              : 
      14            1 : int32_t SendUpdateProfilingRspToTsd(
      15              :     const uint32_t deviceId, const uint32_t waitType, const uint32_t hostPid, const uint32_t vfId)
      16              : {
      17            1 :     return 0;
      18              : }
      19              : 
      20            1 : int32_t CreateOrFindCustPid(
      21              :     const uint32_t deviceId, const uint32_t loadLibNum, const char* const loadLibName[], const uint32_t hostPid,
      22              :     const uint32_t vfId, const char* groupNameList, const uint32_t groupNameNum, int32_t* custProcPid, bool* firstStart)
      23              : {
      24            1 :     return 0;
      25              : }
      26              : 
      27            1 : int32_t SetSubProcScheduleMode(
      28              :     const uint32_t deviceId, const uint32_t waitType, const uint32_t hostPid, const uint32_t vfId,
      29              :     const struct SubProcScheduleModeInfo* scheInfo)
      30              : {
      31              :     (void)deviceId;
      32              :     (void)waitType;
      33              :     (void)hostPid;
      34              :     (void)vfId;
      35              :     (void)scheInfo;
      36            1 :     return 0;
      37              : }
      38              : 
      39              : extern "C" {
      40              : // 修正函数签名,与头文件一致
      41            1 : int32_t RegEventMsgCallBackFunc(const struct SubProcEventCallBackInfo* regInfo)
      42              : {
      43              :     (void)regInfo;
      44            1 :     std::cout << "STUB: RegEventMsgCallBackFunc called" << std::endl;
      45            1 :     return 0; // 返回 int32_t
      46              : }
      47              : 
      48            3 : void UnRegEventMsgCallBackFunc(const uint32_t eventType)
      49              : {
      50              :     (void)eventType;
      51            3 :     std::cout << "STUB: UnRegEventMsgCallBackFunc called" << std::endl;
      52            3 : }
      53              : 
      54           11 : int32_t TsdReportStartOrStopErrCode(
      55              :     const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId, const char* msg,
      56              :     uint32_t msgLen)
      57              : {
      58              :     (void)deviceId;
      59              :     (void)waitType;
      60              :     (void)hostPid;
      61              :     (void)vfId;
      62              :     (void)msg;
      63              :     (void)msgLen;
      64           11 :     std::cout << "STUB: TsdReportStartOrStopErrCode called" << std::endl;
      65           11 :     return 0; // 返回 int32_t
      66              : }
      67              : 
      68            6 : int32_t TsdWaitForShutdown(
      69              :     const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId)
      70              : {
      71              :     (void)deviceId;
      72              :     (void)waitType;
      73              :     (void)hostPid;
      74              :     (void)vfId;
      75            6 :     std::cout << "STUB: TsdWaitForShutdown called" << std::endl;
      76            6 :     return 0; // 返回 int32_t
      77              : }
      78              : 
      79            2 : int32_t TsdDestroy(const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId)
      80              : {
      81              :     (void)deviceId;
      82              :     (void)waitType;
      83              :     (void)hostPid;
      84              :     (void)vfId;
      85            2 :     std::cout << "STUB: TsdDestroy called" << std::endl;
      86            2 :     return 0; // 返回 int32_t
      87              : }
      88              : 
      89            2 : int32_t SubModuleProcessResponse(
      90              :     const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId, uint32_t response)
      91              : {
      92              :     (void)deviceId;
      93              :     (void)waitType;
      94              :     (void)hostPid;
      95              :     (void)vfId;
      96              :     (void)response;
      97            2 :     std::cout << "STUB: SubModuleProcessResponse called" << std::endl;
      98            2 :     return 0; // 返回 int32_t
      99              : }
     100              : 
     101              : } // extern "C"
        

Generated by: LCOV version 2.0-1