SWDEV-330661 - Add test for hipHostGetDevicePointer null check (#2745)
Change-Id: I19668385003a107e21f8484ef28e114b7c6d8a42
[ROCm/hip-tests commit: 2da551c659]
This commit is contained in:
committed by
GitHub
vanhempi
c6673650f2
commit
8d8958110a
@@ -231,4 +231,16 @@ TEST_CASE("Unit_hipHostMalloc_Default") {
|
||||
CheckHostPointer(numElements, A, 0, SYNC_DEVICE, ptrType);
|
||||
CheckHostPointer(numElements, A, 0, SYNC_STREAM, ptrType);
|
||||
CheckHostPointer(numElements, A, 0, SYNC_EVENT, ptrType);
|
||||
|
||||
}
|
||||
|
||||
TEST_CASE("Unit_hipHostGetDevicePointer_NullCheck") {
|
||||
int* d_a;
|
||||
HIP_CHECK(hipHostMalloc(reinterpret_cast<void**>(&d_a), sizeof(int)));
|
||||
|
||||
auto res = hipHostGetDevicePointer(nullptr,d_a,0);
|
||||
REQUIRE(res == hipErrorInvalidValue);
|
||||
|
||||
HIP_CHECK(hipHostFree(d_a));
|
||||
}
|
||||
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user