From 2b400887fec86c820337e45aae58c55a6f9b0192 Mon Sep 17 00:00:00 2001 From: "Ching-Hsin,Lee" Date: Thu, 16 May 2024 23:11:09 +0800 Subject: [PATCH] Set line coverage limit to 100% --- .github/workflows/ci.yml | 2 +- docs/doxygen/include/size_table.md | 2 +- test/wrapper_utest/core_pkcs11_utest.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4491b3c3..13ba0c06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,7 @@ jobs: if: steps.build-unit-tests.outcome == 'success' with: coverage-file: ./build/coverage.info - line-coverage-min: 99 + line-coverage-min: 100 branch-coverage-min: 90 - name: Archive Test Results diff --git a/docs/doxygen/include/size_table.md b/docs/doxygen/include/size_table.md index 73cd297c..d999d2b6 100644 --- a/docs/doxygen/include/size_table.md +++ b/docs/doxygen/include/size_table.md @@ -25,6 +25,6 @@ Total estimates
10.3K
-
8.5K
+
8.4K
diff --git a/test/wrapper_utest/core_pkcs11_utest.c b/test/wrapper_utest/core_pkcs11_utest.c index a2cd04fc..e26fdcbe 100644 --- a/test/wrapper_utest/core_pkcs11_utest.c +++ b/test/wrapper_utest/core_pkcs11_utest.c @@ -179,7 +179,7 @@ static CK_RV prvSetFunctionList( CK_FUNCTION_LIST_PTR_PTR ppxPtr ) /*! * @brief Create a stub for the PKCS #11 function list. * - * Fails on the fourth call in order to create coverage for a nested branch. + * Fails on the thrid call in order to create coverage for a nested branch. * */ static CK_RV prvSetFunctionList2( CK_FUNCTION_LIST_PTR_PTR ppxPtr ) @@ -205,7 +205,7 @@ static CK_RV prvSetFunctionList2( CK_FUNCTION_LIST_PTR_PTR ppxPtr ) /*! * @brief Create a stub for the PKCS #11 function list. * - * Fails on the fourth call in order to create coverage for a nested branch. + * Fails on the third call in order to create coverage for a nested branch. * */ static CK_RV prvSetFunctionList3( CK_FUNCTION_LIST_PTR_PTR ppxPtr ) @@ -217,7 +217,7 @@ static CK_RV prvSetFunctionList3( CK_FUNCTION_LIST_PTR_PTR ppxPtr ) if( ulCalls == 3 ) { - xResult = CKR_OK; + /* Return CKR_OK but with NULL function list pointer here. */ *ppxPtr = NULL; } else