diff --git a/projects/hip-tests/catch/unit/device/hipDeviceGetPCIBusId.cc b/projects/hip-tests/catch/unit/device/hipDeviceGetPCIBusId.cc index 2ae3774395..90f34f6653 100644 --- a/projects/hip-tests/catch/unit/device/hipDeviceGetPCIBusId.cc +++ b/projects/hip-tests/catch/unit/device/hipDeviceGetPCIBusId.cc @@ -84,7 +84,7 @@ TEST_CASE("Unit_hipDeviceGetPCIBusId_Check_PciBusID_WithAttr") { } // Deallocate for (int i = 0; i < deviceCount; i++) { - delete hipDeviceList[i]; + delete[] hipDeviceList[i]; } delete[] hipDeviceList; printf("pciBusID output of both hipDeviceGetPCIBusId and" diff --git a/projects/hip-tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc b/projects/hip-tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc index 5034bf9d46..fa3e8b885e 100644 --- a/projects/hip-tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc +++ b/projects/hip-tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc @@ -167,8 +167,8 @@ TEST_CASE("Unit_hipDeviceGetCacheConfig_Positive_Threaded") { void TestPart3() { hipFuncCache_t returned_cache_config; - HIP_CHECK(hipDeviceGetCacheConfig(&returned_cache_config)); - REQUIRE(returned_cache_config == cache_config_); + HIP_CHECK_THREAD(hipDeviceGetCacheConfig(&returned_cache_config)); + REQUIRE_THREAD(returned_cache_config == cache_config_); } private: diff --git a/projects/hip-tests/catch/unit/device/hipGetDeviceAttribute.cc b/projects/hip-tests/catch/unit/device/hipGetDeviceAttribute.cc index 4316ec86f4..4731619072 100644 --- a/projects/hip-tests/catch/unit/device/hipGetDeviceAttribute.cc +++ b/projects/hip-tests/catch/unit/device/hipGetDeviceAttribute.cc @@ -328,14 +328,14 @@ TEST_CASE("Unit_hipGetDeviceAttribute_CheckFineGrainSupport") { char command_op[BUFFER_LEN]; int count = -1; // Extract each segment flags - while (fgets(command_op, BUFFER_LEN, fpipe)) { + while (fgets(command_op, BUFFER_LEN, fpipe) && (count + 1) < deviceCount) { std::string rocminfo_line(command_op); if ((std::string::npos != rocminfo_line.find("GPU-")) && (std::string::npos != rocminfo_line.find("Uuid:"))) { count++; gpuFound[count] = true; - } else if (gpuFound[count] && - (std::string::npos != rocminfo_line.find("FLAGS: FINE GRAINED"))) { + } else if (count >= 0 && gpuFound[count] && + (std::string::npos != rocminfo_line.find("FLAGS: FINE GRAINED"))) { fine_grained_val[count] = 1; } }