From 8dcec60ac115311bc048f5e8e075386c03b6d9c5 Mon Sep 17 00:00:00 2001 From: Anavena Venkatesh Date: Wed, 13 Aug 2025 12:33:17 +0000 Subject: [PATCH 1/4] SWDEV-546351 - Added test cases for hipGetDriverEntryPoint api --- catch/unit/device/CMakeLists.txt | 1 + catch/unit/device/hipGetDriverEntryPoint.cc | 217 ++++++++++++++++++++ 2 files changed, 218 insertions(+) create mode 100644 catch/unit/device/hipGetDriverEntryPoint.cc diff --git a/catch/unit/device/CMakeLists.txt b/catch/unit/device/CMakeLists.txt index 65d416726..c77b74b2a 100644 --- a/catch/unit/device/CMakeLists.txt +++ b/catch/unit/device/CMakeLists.txt @@ -28,6 +28,7 @@ set(TEST_SRC hipDeviceSetGetMemPool.cc hipInit.cc hipDriverGetVersion.cc + hipGetDriverEntryPoint.cc ) if(HIP_PLATFORM MATCHES "amd" AND BUILD_SHARED_LIBS) diff --git a/catch/unit/device/hipGetDriverEntryPoint.cc b/catch/unit/device/hipGetDriverEntryPoint.cc new file mode 100644 index 000000000..4507c9f3c --- /dev/null +++ b/catch/unit/device/hipGetDriverEntryPoint.cc @@ -0,0 +1,217 @@ +/* +Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANNTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER INN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +#include + +/** + * hipError_t hipGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, + hipDriverEntryPointQueryResult** driverStatus); + * Gets function pointer of a request HIP API + * + * @param [in] symbol The API base name + * @param [out] funcPtr Pinter to the requested function + * @param [in] flags Flags for the search + * @param [out] driverStatus Optional returned status of the search + * + * @returns #hipSuccess, #hipErrorInvalidValue + * + */ + +/** + * Test Description + * ------------------------ + * - This will perfrom the funtionality testing of hipGetDriverEntryPoint api + * Test source + * ------------------------ + * - unit/device/hipGetDriverEntryPoint.cc + * Test requirements + * ------------------------ + * - HIP_VERSION >= 7.1 + */ +TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { + + void* funcPtr = nullptr; + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + + SECTION("hipEnableDefault search flag") { + HIP_CHECK(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); + } + + SECTION("hipEnableLegacyStream search flag") { + HIP_CHECK( + hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnableLegacyStream, &status)); + } + + SECTION("hipEnablePerThreadDefaultStream search flag") { + HIP_CHECK(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnablePerThreadDefaultStream, + &status)); + } + + REQUIRE(*status == hipDriverEntryPointSuccess); + + hipError_t (*hipGetDeviceCount_ptr)(int*) = (hipError_t(*)(int*))funcPtr; + int countFuncPtr; + HIP_CHECK(hipGetDeviceCount_ptr(&countFuncPtr)); + + int count; + HIP_CHECK(hipGetDeviceCount(&count)); + REQUIRE(countFuncPtr == count); + + free(status); +} + +/** + * Test Description + * ------------------------ + * - This tests checks hipGetDriverEntryPoint api with negative parameters + * # symbol is empty + * # funcPtr pointer is null + * # Invalid flag + * Test source + * ------------------------ + * - unit/device/hipGetDriverEntryPoint.cc + * Test requirements + * ------------------------ + * - HIP_VERSION >= 7.1 + */ + +TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { + + void* funcPtr = nullptr; + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + + SECTION("Empty string as symbol") { + HIP_CHECK_ERROR(hipGetDriverEntryPoint("", &funcPtr, hipEnableDefault, &status), + hipErrorInvalidValue); + } + + SECTION("funtion pointer is nullptr") { + HIP_CHECK_ERROR(hipGetDriverEntryPoint("hipGetDeviceCount", nullptr, hipEnableDefault, &status), + hipErrorInvalidValue); + } + + SECTION("Invalid flag") { + HIP_CHECK_ERROR(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, -1, &status), + hipErrorInvalidValue); + } + + free(status); +} + +/** + * hipError_t hipGetDriverEntryPoint_spt(const char* symbol, void** funcPtr, unsigned long long flags, + hipDriverEntryPointQueryResult** driverStatus); + * Gets function pointer of a request HIP API + * + * @param [in] symbol The API base name + * @param [out] funcPtr Pinter to the requested function + * @param [in] flags Flags for the search + * @param [out] driverStatus Optional returned status of the search + * + * @returns #hipSuccess, #hipErrorInvalidValue + * + */ + +/** + * Test Description + * ------------------------ + * - This will perfrom the funtionality testing og hipGetDriverEntryPoint_spt api + * Test source + * ------------------------ + * - unit/device/hipGetDriverEntryPoint.cc + * Test requirements + * ------------------------ + * - HIP_VERSION >= 7.1 + */ + +TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { + + void* funcPtr = nullptr; + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + + SECTION("hipEnableDefault search flag") { + HIP_CHECK(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); + } + + SECTION("hipEnableLegacyStream search flag") { + HIP_CHECK( + hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnableLegacyStream, &status)); + } + + SECTION("hipEnablePerThreadDefaultStream search flag") { + HIP_CHECK(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnablePerThreadDefaultStream, + &status)); + } + + REQUIRE(*status == hipDriverEntryPointSuccess); + + hipError_t (*hipGetDeviceCount_ptr)(int*) = (hipError_t(*)(int*))funcPtr; + int countFuncPtr; + HIP_CHECK(hipGetDeviceCount_ptr(&countFuncPtr)); + + int count; + HIP_CHECK(hipGetDeviceCount(&count)); + + REQUIRE(countFuncPtr == count); + + free(status); +} + +/** + * Test Description + * ------------------------ + * - This tests checks hipGetDriverEntryPoint_spt api with negative parameters + * # symbol is empty + * # funcPtr pointer is null + * # Invalid flag + * Test source + * ------------------------ + * - unit/device/hipGetDriverEntryPoint.cc + * Test requirements + * ------------------------ + * - HIP_VERSION >= 7.1 + */ + +TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Negative") { + + void* funcPtr = nullptr; + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + + SECTION("Empty string as symbol") { + HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("", &funcPtr, hipEnableDefault, &status), + hipErrorInvalidValue); + } + + SECTION("funtion pointer is nullptr") { + HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("hipGetDeviceCount", nullptr, hipEnableDefault, &status), + hipErrorInvalidValue); + } + + SECTION("Invalid flag") { + HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, -1, &status), + hipErrorInvalidValue); + } + + free(status); +} + +/** + * End doxygen group DeviceTest. + * @} + */ From 46c629b7aba94ba14f1b9f977493c5585d114758 Mon Sep 17 00:00:00 2001 From: Anavena Venkatesh Date: Wed, 13 Aug 2025 12:36:14 +0000 Subject: [PATCH 2/4] SWDEV-546351 - Added test cases for hipGetDriverEntryPoint api --- catch/unit/device/hipGetDriverEntryPoint.cc | 51 ++++++++++----------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/catch/unit/device/hipGetDriverEntryPoint.cc b/catch/unit/device/hipGetDriverEntryPoint.cc index 4507c9f3c..c6a660c78 100644 --- a/catch/unit/device/hipGetDriverEntryPoint.cc +++ b/catch/unit/device/hipGetDriverEntryPoint.cc @@ -45,24 +45,23 @@ THE SOFTWARE. * - HIP_VERSION >= 7.1 */ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { - void* funcPtr = nullptr; hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); - + SECTION("hipEnableDefault search flag") { HIP_CHECK(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); } - + SECTION("hipEnableLegacyStream search flag") { HIP_CHECK( hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnableLegacyStream, &status)); } - + SECTION("hipEnablePerThreadDefaultStream search flag") { HIP_CHECK(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnablePerThreadDefaultStream, &status)); } - + REQUIRE(*status == hipDriverEntryPointSuccess); hipError_t (*hipGetDeviceCount_ptr)(int*) = (hipError_t(*)(int*))funcPtr; @@ -92,31 +91,30 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { */ TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { - void* funcPtr = nullptr; hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); - + SECTION("Empty string as symbol") { HIP_CHECK_ERROR(hipGetDriverEntryPoint("", &funcPtr, hipEnableDefault, &status), hipErrorInvalidValue); } - + SECTION("funtion pointer is nullptr") { HIP_CHECK_ERROR(hipGetDriverEntryPoint("hipGetDeviceCount", nullptr, hipEnableDefault, &status), hipErrorInvalidValue); } - + SECTION("Invalid flag") { HIP_CHECK_ERROR(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, -1, &status), hipErrorInvalidValue); } - + free(status); } /** - * hipError_t hipGetDriverEntryPoint_spt(const char* symbol, void** funcPtr, unsigned long long flags, - hipDriverEntryPointQueryResult** driverStatus); + * hipError_t hipGetDriverEntryPoint_spt(const char* symbol, void** funcPtr, unsigned long long + flags, hipDriverEntryPointQueryResult** driverStatus); * Gets function pointer of a request HIP API * * @param [in] symbol The API base name @@ -141,10 +139,9 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { */ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { - void* funcPtr = nullptr; hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); - + SECTION("hipEnableDefault search flag") { HIP_CHECK(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); } @@ -153,12 +150,12 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { HIP_CHECK( hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnableLegacyStream, &status)); } - + SECTION("hipEnablePerThreadDefaultStream search flag") { - HIP_CHECK(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnablePerThreadDefaultStream, - &status)); + HIP_CHECK(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, + hipEnablePerThreadDefaultStream, &status)); } - + REQUIRE(*status == hipDriverEntryPointSuccess); hipError_t (*hipGetDeviceCount_ptr)(int*) = (hipError_t(*)(int*))funcPtr; @@ -167,9 +164,9 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { int count; HIP_CHECK(hipGetDeviceCount(&count)); - + REQUIRE(countFuncPtr == count); - + free(status); } @@ -189,25 +186,25 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { */ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Negative") { - void* funcPtr = nullptr; hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); - + SECTION("Empty string as symbol") { HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("", &funcPtr, hipEnableDefault, &status), hipErrorInvalidValue); } - + SECTION("funtion pointer is nullptr") { - HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("hipGetDeviceCount", nullptr, hipEnableDefault, &status), - hipErrorInvalidValue); + HIP_CHECK_ERROR( + hipGetDriverEntryPoint_spt("hipGetDeviceCount", nullptr, hipEnableDefault, &status), + hipErrorInvalidValue); } - + SECTION("Invalid flag") { HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, -1, &status), hipErrorInvalidValue); } - + free(status); } From 7fc0cb6e12733be070795a8036e74c9bacd85a7a Mon Sep 17 00:00:00 2001 From: Anavena Venkatesh Date: Wed, 13 Aug 2025 17:05:26 +0000 Subject: [PATCH 3/4] SWDEV-546351 - Added test cases for hipGetDriverEntryPoint api --- catch/unit/device/hipGetDriverEntryPoint.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/catch/unit/device/hipGetDriverEntryPoint.cc b/catch/unit/device/hipGetDriverEntryPoint.cc index c6a660c78..6859bf12f 100644 --- a/catch/unit/device/hipGetDriverEntryPoint.cc +++ b/catch/unit/device/hipGetDriverEntryPoint.cc @@ -46,7 +46,7 @@ THE SOFTWARE. */ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; SECTION("hipEnableDefault search flag") { HIP_CHECK(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); @@ -72,7 +72,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { HIP_CHECK(hipGetDeviceCount(&count)); REQUIRE(countFuncPtr == count); - free(status); + delete status; } /** @@ -92,7 +92,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; SECTION("Empty string as symbol") { HIP_CHECK_ERROR(hipGetDriverEntryPoint("", &funcPtr, hipEnableDefault, &status), @@ -109,7 +109,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { hipErrorInvalidValue); } - free(status); + delete status; } /** @@ -140,7 +140,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; SECTION("hipEnableDefault search flag") { HIP_CHECK(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); @@ -167,7 +167,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { REQUIRE(countFuncPtr == count); - free(status); + delete status; } /** @@ -187,7 +187,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Negative") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult(); + hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; SECTION("Empty string as symbol") { HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("", &funcPtr, hipEnableDefault, &status), @@ -205,7 +205,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Negative") { hipErrorInvalidValue); } - free(status); + delete status; } /** From 704e02aec0f5f07fc15b61ed0ae6560fabbbf165 Mon Sep 17 00:00:00 2001 From: Anavena Venkatesh Date: Thu, 14 Aug 2025 09:27:00 +0000 Subject: [PATCH 4/4] SWDEV-546351 : Added test cases for hipGetDriverEntryPoint api --- catch/unit/device/CMakeLists.txt | 4 ++-- catch/unit/device/hipGetDriverEntryPoint.cc | 25 +++++++-------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/catch/unit/device/CMakeLists.txt b/catch/unit/device/CMakeLists.txt index c77b74b2a..556d3e988 100644 --- a/catch/unit/device/CMakeLists.txt +++ b/catch/unit/device/CMakeLists.txt @@ -28,12 +28,12 @@ set(TEST_SRC hipDeviceSetGetMemPool.cc hipInit.cc hipDriverGetVersion.cc - hipGetDriverEntryPoint.cc ) if(HIP_PLATFORM MATCHES "amd" AND BUILD_SHARED_LIBS) set(AMD_SRC - hipGetProcAddressDevMgmt.cc) + hipGetProcAddressDevMgmt.cc + hipGetDriverEntryPoint.cc) if(UNIX) set(AMD_SRC ${AMD_SRC} hipGetProcAddressIpcApis.cc) endif() diff --git a/catch/unit/device/hipGetDriverEntryPoint.cc b/catch/unit/device/hipGetDriverEntryPoint.cc index 6859bf12f..5a943cdaf 100644 --- a/catch/unit/device/hipGetDriverEntryPoint.cc +++ b/catch/unit/device/hipGetDriverEntryPoint.cc @@ -21,7 +21,7 @@ THE SOFTWARE. /** * hipError_t hipGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, - hipDriverEntryPointQueryResult** driverStatus); + hipDriverEntryPointQueryResult* driverStatus); * Gets function pointer of a request HIP API * * @param [in] symbol The API base name @@ -46,7 +46,7 @@ THE SOFTWARE. */ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; + hipDriverEntryPointQueryResult status; SECTION("hipEnableDefault search flag") { HIP_CHECK(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); @@ -62,7 +62,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { &status)); } - REQUIRE(*status == hipDriverEntryPointSuccess); + REQUIRE(status == hipDriverEntryPointSuccess); hipError_t (*hipGetDeviceCount_ptr)(int*) = (hipError_t(*)(int*))funcPtr; int countFuncPtr; @@ -71,8 +71,6 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { int count; HIP_CHECK(hipGetDeviceCount(&count)); REQUIRE(countFuncPtr == count); - - delete status; } /** @@ -92,7 +90,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Positive") { TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; + hipDriverEntryPointQueryResult status; SECTION("Empty string as symbol") { HIP_CHECK_ERROR(hipGetDriverEntryPoint("", &funcPtr, hipEnableDefault, &status), @@ -108,13 +106,11 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { HIP_CHECK_ERROR(hipGetDriverEntryPoint("hipGetDeviceCount", &funcPtr, -1, &status), hipErrorInvalidValue); } - - delete status; } /** * hipError_t hipGetDriverEntryPoint_spt(const char* symbol, void** funcPtr, unsigned long long - flags, hipDriverEntryPointQueryResult** driverStatus); + flags, hipDriverEntryPointQueryResult* driverStatus); * Gets function pointer of a request HIP API * * @param [in] symbol The API base name @@ -140,7 +136,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_Negative") { TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; + hipDriverEntryPointQueryResult status; SECTION("hipEnableDefault search flag") { HIP_CHECK(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, hipEnableDefault, &status)); @@ -156,7 +152,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { hipEnablePerThreadDefaultStream, &status)); } - REQUIRE(*status == hipDriverEntryPointSuccess); + REQUIRE(status == hipDriverEntryPointSuccess); hipError_t (*hipGetDeviceCount_ptr)(int*) = (hipError_t(*)(int*))funcPtr; int countFuncPtr; @@ -166,8 +162,6 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { HIP_CHECK(hipGetDeviceCount(&count)); REQUIRE(countFuncPtr == count); - - delete status; } /** @@ -187,7 +181,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Positive") { TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Negative") { void* funcPtr = nullptr; - hipDriverEntryPointQueryResult* status = new hipDriverEntryPointQueryResult; + hipDriverEntryPointQueryResult status; SECTION("Empty string as symbol") { HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("", &funcPtr, hipEnableDefault, &status), @@ -204,10 +198,7 @@ TEST_CASE("Unit_hipGetDriverEntryPoint_spt_Negative") { HIP_CHECK_ERROR(hipGetDriverEntryPoint_spt("hipGetDeviceCount", &funcPtr, -1, &status), hipErrorInvalidValue); } - - delete status; } - /** * End doxygen group DeviceTest. * @}