LCOV - code coverage report
Current view: top level - base_comm/resources/hccp/rdma_agent/client/async - ra_comm.c (source / functions) Coverage Total Hit
Test: coverage.info Lines: 88.9 % 9 8
Test Date: 2026-08-18 17:47:01 Functions: 100.0 % 1 1

            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 "user_log.h"
      12              : #include "ra_async.h"
      13              : #include "ra_rs_comm.h"
      14              : #include "ra_hdc_async.h"
      15              : #include "hccp_async.h"
      16              : 
      17            1 : HCCP_ATTRI_VISI_DEF int RaGetAsyncReqResult(void *reqHandle, int *reqResult)
      18              : {
      19            1 :     struct RaRequestHandle *reqHandleTmp = NULL;
      20              : 
      21            1 :     CHK_PRT_RETURN(reqHandle == NULL || reqResult == NULL, hccp_err("[get][async]req_handle or req_result is NULL"),
      22              :         ConverReturnCode(OTHERS, -EINVAL));
      23              : 
      24            1 :     reqHandleTmp = (struct RaRequestHandle *)reqHandle;
      25            1 :     if (!reqHandleTmp->isDone) {
      26            0 :         return ConverReturnCode(OTHERS, -EAGAIN);
      27              :     }
      28              : 
      29            1 :     *reqResult = ConverReturnCode(reqHandleTmp->opHandle->opModule, reqHandleTmp->opRet);
      30            1 :     HdcAsyncDelResponse(reqHandleTmp);
      31            1 :     return 0;
      32              : }
        

Generated by: LCOV version 2.0-1