From 5fa9900949ca6937c115eefb2d176883204a1618 Mon Sep 17 00:00:00 2001 From: Vladana Stojiljkovic Date: Fri, 9 Aug 2024 15:41:00 +0200 Subject: [PATCH] SWDEV-478472 - Fix tests to return hipErrorInvalidChannelDescriptor instead of hipErrorUnknown Change-Id: I1dc3af072aed813173cc12e9976a34ddf8c7d6a8 --- .../config/config_nvidia_linux.json | 21 +------------------ .../config/config_nvidia_windows.json | 19 +---------------- catch/unit/memory/hipMalloc3DArray.cc | 2 +- catch/unit/memory/hipMallocArray.cc | 18 ++++++++++------ catch/unit/memory/hipMallocMipmappedArray.cc | 2 +- 5 files changed, 16 insertions(+), 46 deletions(-) diff --git a/catch/hipTestMain/config/config_nvidia_linux.json b/catch/hipTestMain/config/config_nvidia_linux.json index 5ee2cfb1c7..508f42635e 100644 --- a/catch/hipTestMain/config/config_nvidia_linux.json +++ b/catch/hipTestMain/config/config_nvidia_linux.json @@ -225,25 +225,6 @@ "Unit_Assert_Positive_Basic_KernelFail", "=== Below tests fail in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/210 ===", "Unit_hipMemImportFromShareableHandle_Positive_MultiProc", - "Unit_hipMemMapArrayAsync_Positive_Basic", - "=== SWDEV-475987 : Disable tests to merge hipother change 12/08/2024 ===", - "Unit_hipMalloc3DArray_Negative_InvalidFormat", - "Unit_hipMalloc3DArray_Negative_BadChannelLayout", - "Unit_hipMalloc3DArray_Negative_8BitFloat", - "Unit_hipMalloc3DArray_Negative_DifferentChannelSizes", - "Unit_hipMalloc3DArray_Negative_BadChannelSize", - "Unit_hipMallocMipmappedArray_Negative_InvalidFormat", - "Unit_hipMallocMipmappedArray_Negative_BadChannelLayout", - "Unit_hipMallocMipmappedArray_Negative_8BitFloat", - "Unit_hipMallocMipmappedArray_Negative_DifferentChannelSizes", - "Unit_hipMallocMipmappedArray_Negative_BadChannelSize", - "Unit_hipMallocArray_Negative_DifferentChannelSizes", - "Unit_hipMallocArray_Negative_8bitFloat - float", - "Unit_hipMallocArray_Negative_8bitFloat - float2", - "Unit_hipMallocArray_Negative_8bitFloat - float4", - "Unit_hipMallocArray_Negative_BadNumberOfBits", - "Unit_hipMallocArray_Negative_3ChannelElement", - "Unit_hipMallocArray_Negative_ChannelAfterZeroChannel", - "Unit_hipMallocArray_Negative_InvalidChannelFormat" + "Unit_hipMemMapArrayAsync_Positive_Basic" ] } diff --git a/catch/hipTestMain/config/config_nvidia_windows.json b/catch/hipTestMain/config/config_nvidia_windows.json index 48d727bf05..ebce1e7c5f 100644 --- a/catch/hipTestMain/config/config_nvidia_windows.json +++ b/catch/hipTestMain/config/config_nvidia_windows.json @@ -39,23 +39,6 @@ "Performance_hipMemsetD32Async", "Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior", "Unit_hipMemcpy_Positive_Synchronization_Behavior", - "Unit_hipMemMapArrayAsync_Positive_Basic", - "=== SWDEV-475987 : Disable tests to merge hipother change 12/08/2024 ===", - "Unit_hipMalloc3DArray_Negative_InvalidFormat", - "Unit_hipMalloc3DArray_Negative_BadChannelLayout", - "Unit_hipMalloc3DArray_Negative_8BitFloat", - "Unit_hipMalloc3DArray_Negative_DifferentChannelSizes", - "Unit_hipMalloc3DArray_Negative_BadChannelSize", - "Unit_hipMallocMipmappedArray_Negative_InvalidFormat", - "Unit_hipMallocMipmappedArray_Negative_BadChannelLayout", - "Unit_hipMallocMipmappedArray_Negative_8BitFloat", - "Unit_hipMallocMipmappedArray_Negative_DifferentChannelSizes", - "Unit_hipMallocMipmappedArray_Negative_BadChannelSize", - "Unit_hipMallocArray_Negative_DifferentChannelSizes", - "Unit_hipMallocArray_Negative_8bitFloat", - "Unit_hipMallocArray_Negative_BadNumberOfBits", - "Unit_hipMallocArray_Negative_3ChannelElement", - "Unit_hipMallocArray_Negative_ChannelAfterZeroChannel", - "Unit_hipMallocArray_Negative_InvalidChannelFormat" + "Unit_hipMemMapArrayAsync_Positive_Basic" ] } diff --git a/catch/unit/memory/hipMalloc3DArray.cc b/catch/unit/memory/hipMalloc3DArray.cc index a0741a1055..9ce51a4bb3 100644 --- a/catch/unit/memory/hipMalloc3DArray.cc +++ b/catch/unit/memory/hipMalloc3DArray.cc @@ -333,7 +333,7 @@ void testInvalidDescription(hipChannelFormatDesc desc) { hipArray_t array; #if HT_NVIDIA - hipError_t expectedError = hipErrorUnknown; + hipError_t expectedError = hipErrorInvalidChannelDescriptor; #else hipError_t expectedError = hipErrorInvalidValue; #endif diff --git a/catch/unit/memory/hipMallocArray.cc b/catch/unit/memory/hipMallocArray.cc index 33db8b8b16..69f6ad6977 100644 --- a/catch/unit/memory/hipMallocArray.cc +++ b/catch/unit/memory/hipMallocArray.cc @@ -523,7 +523,8 @@ TEST_CASE("Unit_hipMallocArray_Negative_DifferentChannelSizes") { HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, width, height, flag), hipErrorInvalidValue); #else unsigned int flag = GENERATE(hipArrayDefault, hipArraySurfaceLoadStore, hipArrayTextureGather); - HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, width, height, flag), hipErrorUnknown); + HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, width, height, flag), + hipErrorInvalidChannelDescriptor); #endif } @@ -605,7 +606,8 @@ TEMPLATE_TEST_CASE("Unit_hipMallocArray_Negative_8bitFloat", "", float, float2, HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flags), hipErrorInvalidValue); #else unsigned int flags = GENERATE(hipArrayDefault, hipArraySurfaceLoadStore, hipArrayTextureGather); - HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flags), hipErrorUnknown); + HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flags), + hipErrorInvalidChannelDescriptor); #endif } @@ -633,7 +635,8 @@ TEST_CASE("Unit_hipMallocArray_Negative_BadNumberOfBits") { #else unsigned int flag = GENERATE(hipArrayDefault, hipArraySurfaceLoadStore, hipArrayTextureGather); INFO("flag: " << flag); - HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), hipErrorUnknown); + HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), + hipErrorInvalidChannelDescriptor); #endif } @@ -661,7 +664,8 @@ TEST_CASE("Unit_hipMallocArray_Negative_3ChannelElement") { HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), hipErrorInvalidValue); #else unsigned int flag = GENERATE(hipArrayDefault, hipArraySurfaceLoadStore, hipArrayTextureGather); - HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), hipErrorUnknown); + HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), + hipErrorInvalidChannelDescriptor); #endif } @@ -690,7 +694,8 @@ TEST_CASE("Unit_hipMallocArray_Negative_ChannelAfterZeroChannel") { HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), hipErrorInvalidValue); #else unsigned int flag = GENERATE(hipArrayDefault, hipArraySurfaceLoadStore, hipArrayTextureGather); - HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), hipErrorUnknown); + HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), + hipErrorInvalidChannelDescriptor); #endif } @@ -715,7 +720,8 @@ TEST_CASE("Unit_hipMallocArray_Negative_InvalidChannelFormat") { HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), hipErrorInvalidValue); #else unsigned int flag = GENERATE(hipArrayDefault, hipArraySurfaceLoadStore); - HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), hipErrorUnknown); + HIP_CHECK_ERROR(hipMallocArray(&arrayPtr, &desc, 1024, 1024, flag), + hipErrorInvalidChannelDescriptor); #endif } diff --git a/catch/unit/memory/hipMallocMipmappedArray.cc b/catch/unit/memory/hipMallocMipmappedArray.cc index 2c5164440a..e68550923e 100644 --- a/catch/unit/memory/hipMallocMipmappedArray.cc +++ b/catch/unit/memory/hipMallocMipmappedArray.cc @@ -271,7 +271,7 @@ void testInvalidDescriptionMipmapped(hipChannelFormatDesc desc) { hipMipmappedArray_t array; #if HT_NVIDIA - hipError_t expectedError = hipErrorUnknown; + hipError_t expectedError = hipErrorInvalidChannelDescriptor; #else hipError_t expectedError = hipErrorInvalidValue; #endif