[SWDEV-468555] - Fix hipMemGetAddressRange Negative test
Change-Id: I1dd195f3d1deaf90d86afdd17cac687220f53a0c
[ROCm/hip-tests commit: 810489ee3b]
This commit is contained in:
committed by
Rakesh Roy
parent
97cb59fb66
commit
f4dc733590
@@ -49,7 +49,6 @@
|
||||
"Unit_hipKernelNameRef_Negative_Parameters",
|
||||
"Unit_hipMemAdvise_AccessedBy_All_Devices",
|
||||
"Unit_hipMemAdvise_No_Flag_Interference",
|
||||
"Unit_hipMemGetAddressRange_Negative",
|
||||
"NOTE: The following 2 tests are disabled due to defect - EXSWHTEC-238",
|
||||
"Unit_hipDrvMemcpy3D_Positive_Array",
|
||||
"Unit_hipDrvMemcpy3DAsync_Positive_Array",
|
||||
|
||||
@@ -134,7 +134,6 @@
|
||||
"Unit_hipGraphDestroyNode_Complx_ChkNumOfNodesNDep",
|
||||
"Unit_hipGraphDestroyNode_Complx_ChkNumOfNodesNDep_ClonedGrph",
|
||||
"Unit_hipGraphDestroyNode_Complx_ChkNumOfNodesNDep_ChldNode",
|
||||
"Unit_hipMemGetAddressRange_Negative",
|
||||
"NOTE: The following 2 tests are disabled due to defect - EXSWHTEC-238",
|
||||
"Unit_hipDrvMemcpy3D_Positive_Array",
|
||||
"Unit_hipDrvMemcpy3DAsync_Positive_Array",
|
||||
|
||||
@@ -105,7 +105,7 @@ TEST_CASE("Unit_hipMemGetAddressRange_Negative") {
|
||||
size_t mem_size = 0;
|
||||
const auto allocation_size = kPageSize / 2;
|
||||
const int offset = kPageSize;
|
||||
LinearAllocGuard<int> host_alloc(LinearAllocs::hipHostMalloc, allocation_size);
|
||||
LinearAllocGuard<int> dst_alloc(LinearAllocs::hipMalloc, allocation_size);
|
||||
|
||||
hipDeviceptr_t dummy_ptr = NULL;
|
||||
|
||||
@@ -115,7 +115,7 @@ TEST_CASE("Unit_hipMemGetAddressRange_Negative") {
|
||||
SECTION("Offset is greater than allocated size") {
|
||||
HIP_CHECK_ERROR(
|
||||
hipMemGetAddressRange(&base_ptr, &mem_size,
|
||||
reinterpret_cast<hipDeviceptr_t>(host_alloc.ptr() + offset)),
|
||||
reinterpret_cast<hipDeviceptr_t>(dst_alloc.ptr() + offset)),
|
||||
hipErrorNotFound);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user