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-31 10:07:22 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              :     (void)deviceId;
      18              :     (void)waitType;
      19              :     (void)hostPid;
      20              :     (void)vfId;
      21            1 :     return 0;
      22              : }
      23              : 
      24            1 : int32_t CreateOrFindCustPid(
      25              :     const uint32_t deviceId, const uint32_t loadLibNum, const char* const loadLibName[], const uint32_t hostPid,
      26              :     const uint32_t vfId, const char* const groupNameList, const uint32_t groupNameNum, int32_t* const custProcPid,
      27              :     bool* const firstStart)
      28              : {
      29              :     (void)deviceId;
      30              :     (void)loadLibNum;
      31              :     (void)loadLibName;
      32              :     (void)hostPid;
      33              :     (void)vfId;
      34              :     (void)groupNameList;
      35              :     (void)groupNameNum;
      36              :     (void)custProcPid;
      37              :     (void)firstStart;
      38            1 :     return 0;
      39              : }
      40              : 
      41            1 : int32_t SetSubProcScheduleMode(
      42              :     const uint32_t deviceId, const uint32_t waitType, const uint32_t hostPid, const uint32_t vfId,
      43              :     const struct SubProcScheduleModeInfo* scheInfo)
      44              : {
      45              :     (void)deviceId;
      46              :     (void)waitType;
      47              :     (void)hostPid;
      48              :     (void)vfId;
      49              :     (void)scheInfo;
      50            1 :     return 0;
      51              : }
      52              : 
      53              : extern "C" {
      54              : // 修正函数签名,与头文件一致
      55            1 : int32_t RegEventMsgCallBackFunc(const struct SubProcEventCallBackInfo* regInfo)
      56              : {
      57              :     (void)regInfo;
      58            1 :     std::cout << "STUB: RegEventMsgCallBackFunc called" << std::endl;
      59            1 :     return 0; // 返回 int32_t
      60              : }
      61              : 
      62            3 : void UnRegEventMsgCallBackFunc(const uint32_t eventType)
      63              : {
      64              :     (void)eventType;
      65            3 :     std::cout << "STUB: UnRegEventMsgCallBackFunc called" << std::endl;
      66            3 : }
      67              : 
      68           11 : int32_t TsdReportStartOrStopErrCode(
      69              :     const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId,
      70              :     const char* errCode, const uint32_t errLen)
      71              : {
      72              :     (void)deviceId;
      73              :     (void)waitType;
      74              :     (void)hostPid;
      75              :     (void)vfId;
      76              :     (void)errCode;
      77              :     (void)errLen;
      78           11 :     std::cout << "STUB: TsdReportStartOrStopErrCode called" << std::endl;
      79           11 :     return 0; // 返回 int32_t
      80              : }
      81              : 
      82            6 : int32_t TsdWaitForShutdown(
      83              :     const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId)
      84              : {
      85              :     (void)deviceId;
      86              :     (void)waitType;
      87              :     (void)hostPid;
      88              :     (void)vfId;
      89            6 :     std::cout << "STUB: TsdWaitForShutdown called" << std::endl;
      90            6 :     return 0; // 返回 int32_t
      91              : }
      92              : 
      93            2 : int32_t TsdDestroy(const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId)
      94              : {
      95              :     (void)deviceId;
      96              :     (void)waitType;
      97              :     (void)hostPid;
      98              :     (void)vfId;
      99            2 :     std::cout << "STUB: TsdDestroy called" << std::endl;
     100            2 :     return 0; // 返回 int32_t
     101              : }
     102              : 
     103            2 : int32_t SubModuleProcessResponse(
     104              :     const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId,
     105              :     const uint32_t eventType)
     106              : {
     107              :     (void)deviceId;
     108              :     (void)waitType;
     109              :     (void)hostPid;
     110              :     (void)vfId;
     111              :     (void)eventType;
     112            2 :     std::cout << "STUB: SubModuleProcessResponse called" << std::endl;
     113            2 :     return 0; // 返回 int32_t
     114              : }
     115              : 
     116              : } // extern "C"
        

Generated by: LCOV version 2.0-1