From 160e1ef0a1354a52fc07a72e19a089be94c09446 Mon Sep 17 00:00:00 2001 From: Rakesh Roy Date: Wed, 13 Mar 2024 12:59:15 +0530 Subject: [PATCH] SWDEV-448118 - Enable MemPool SetAccess testcase & Update Mipmapped Array Testcases - Unit_hipMemPoolSetAccess_Negative_Parameters has been fixed, so enable it back - Mipmap is not supported on Linux, skip inside the testcases Change-Id: If4e6aaef1bbbff33b810714aecfc3e41fa6b41f3 [ROCm/hip-tests commit: 237bdf377fa89a6186ee86f6a1a3347715077a87] --- .../hip-tests/catch/hipTestMain/config/config_amd_linux | 7 ------- .../hip-tests/catch/unit/texture/hipFreeMipmappedArray.cc | 5 +++++ .../catch/unit/texture/hipGetMipmappedArrayLevel.cc | 5 +++++ .../catch/unit/texture/hipMallocMipmappedArray.cc | 5 +++++ .../catch/unit/texture/hipMipmappedArrayCreate.cc | 5 +++++ .../catch/unit/texture/hipMipmappedArrayDestroy.cc | 7 ++++++- .../catch/unit/texture/hipMipmappedArrayGetLevel.cc | 5 +++++ 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux index f2b8f951cf..5674bbbe39 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux @@ -1392,7 +1392,6 @@ "Unit_atomicCAS_system_Positive_Host_And_Peer_GPUs - unsigned int", "Unit_atomicCAS_system_Positive_Host_And_Peer_GPUs - unsigned long long", "SWDEV-447384, SWDEV-447932: These tests fail in Navi31, Navi32 & Navi33", - "Unit_hipMemPoolSetAccess_Negative_Parameters", "Unit_hipFreeAsync_Negative_Parameters", "Unit_hipMallocMipmappedArray_DiffSizes", "Unit_hipMallocMipmappedArray_MultiThread", @@ -1417,12 +1416,6 @@ "Unit_hipFreeMipmappedArrayMultiTArray - char", "Unit_hipFreeMipmappedArrayMultiTArray - int", "Unit_hipIpcGetMemHandle_Positive_Unique_Handles_Reused_Memory", - "Unit_hipMallocMipmappedArray_Negative_Parameters", - "Unit_hipFreeMipmappedArray_Negative_Parameters", - "Unit_hipGetMipmappedArrayLevel_Negative_Parameters", - "Unit_hipMipmappedArrayCreate_Negative_Parameters", - "Unit_hipMipmappedArrayDestroy_Negative_Parameters", - "Unit_hipMipmappedArrayGetLevel_Negative_Parameters", "Unit_Multi_Grid_Group_Getters_Positive_Basic", "Unit_Multi_Grid_Group_Getters_Positive_Base_Type", "Unit_Multi_Grid_Group_Getters_Positive_Non_Member_Functions", diff --git a/projects/hip-tests/catch/unit/texture/hipFreeMipmappedArray.cc b/projects/hip-tests/catch/unit/texture/hipFreeMipmappedArray.cc index 889e39f128..802a856b31 100644 --- a/projects/hip-tests/catch/unit/texture/hipFreeMipmappedArray.cc +++ b/projects/hip-tests/catch/unit/texture/hipFreeMipmappedArray.cc @@ -42,6 +42,11 @@ THE SOFTWARE. TEST_CASE("Unit_hipFreeMipmappedArray_Negative_Parameters") { CHECK_IMAGE_SUPPORT; +#ifdef __linux__ + HipTest::HIP_SKIP_TEST("Mipmap APIs are not supported on Linux"); + return; +#endif //__linux__ + SECTION("array is nullptr") { HIP_CHECK_ERROR(hipFreeMipmappedArray(nullptr), hipErrorInvalidValue); } diff --git a/projects/hip-tests/catch/unit/texture/hipGetMipmappedArrayLevel.cc b/projects/hip-tests/catch/unit/texture/hipGetMipmappedArrayLevel.cc index ab5abc80fa..661fbcd361 100644 --- a/projects/hip-tests/catch/unit/texture/hipGetMipmappedArrayLevel.cc +++ b/projects/hip-tests/catch/unit/texture/hipGetMipmappedArrayLevel.cc @@ -42,6 +42,11 @@ THE SOFTWARE. TEST_CASE("Unit_hipGetMipmappedArrayLevel_Negative_Parameters") { CHECK_IMAGE_SUPPORT; +#ifdef __linux__ + HipTest::HIP_SKIP_TEST("Mipmap APIs are not supported on Linux"); + return; +#endif //__linux__ + hipMipmappedArray_t array; hipChannelFormatDesc desc = hipCreateChannelDesc(); hipExtent extent = make_hipExtent(4, 4, 6); diff --git a/projects/hip-tests/catch/unit/texture/hipMallocMipmappedArray.cc b/projects/hip-tests/catch/unit/texture/hipMallocMipmappedArray.cc index a579453be7..352d50506b 100644 --- a/projects/hip-tests/catch/unit/texture/hipMallocMipmappedArray.cc +++ b/projects/hip-tests/catch/unit/texture/hipMallocMipmappedArray.cc @@ -42,6 +42,11 @@ THE SOFTWARE. TEST_CASE("Unit_hipMallocMipmappedArray_Negative_Parameters") { CHECK_IMAGE_SUPPORT; +#ifdef __linux__ + HipTest::HIP_SKIP_TEST("Mipmap APIs are not supported on Linux"); + return; +#endif //__linux__ + hipMipmappedArray_t array; hipChannelFormatDesc desc = hipCreateChannelDesc(); hipExtent extent = make_hipExtent(4, 4, 6); diff --git a/projects/hip-tests/catch/unit/texture/hipMipmappedArrayCreate.cc b/projects/hip-tests/catch/unit/texture/hipMipmappedArrayCreate.cc index 3a291cd43b..e6e4732a06 100644 --- a/projects/hip-tests/catch/unit/texture/hipMipmappedArrayCreate.cc +++ b/projects/hip-tests/catch/unit/texture/hipMipmappedArrayCreate.cc @@ -43,6 +43,11 @@ THE SOFTWARE. TEST_CASE("Unit_hipMipmappedArrayCreate_Negative_Parameters") { CHECK_IMAGE_SUPPORT; +#ifdef __linux__ + HipTest::HIP_SKIP_TEST("Mipmap APIs are not supported on Linux"); + return; +#endif //__linux__ + hipmipmappedArray array; HIP_ARRAY3D_DESCRIPTOR desc = {}; diff --git a/projects/hip-tests/catch/unit/texture/hipMipmappedArrayDestroy.cc b/projects/hip-tests/catch/unit/texture/hipMipmappedArrayDestroy.cc index 288d37723e..16f1f19518 100644 --- a/projects/hip-tests/catch/unit/texture/hipMipmappedArrayDestroy.cc +++ b/projects/hip-tests/catch/unit/texture/hipMipmappedArrayDestroy.cc @@ -43,10 +43,15 @@ THE SOFTWARE. TEST_CASE("Unit_hipMipmappedArrayDestroy_Negative_Parameters") { CHECK_IMAGE_SUPPORT; +#ifdef __linux__ + HipTest::HIP_SKIP_TEST("Mipmap APIs are not supported on Linux"); + return; +#endif //__linux__ + HIP_CHECK(hipFree(0)); SECTION("array is nullptr") { - HIP_CHECK_ERROR(hipMipmappedArrayDestroy(nullptr), hipErrorInvalidHandle); + HIP_CHECK_ERROR(hipMipmappedArrayDestroy(nullptr), hipErrorInvalidValue); } SECTION("double free") { diff --git a/projects/hip-tests/catch/unit/texture/hipMipmappedArrayGetLevel.cc b/projects/hip-tests/catch/unit/texture/hipMipmappedArrayGetLevel.cc index 56e73684ad..69d4a071f9 100644 --- a/projects/hip-tests/catch/unit/texture/hipMipmappedArrayGetLevel.cc +++ b/projects/hip-tests/catch/unit/texture/hipMipmappedArrayGetLevel.cc @@ -43,6 +43,11 @@ THE SOFTWARE. TEST_CASE("Unit_hipMipmappedArrayGetLevel_Negative_Parameters") { CHECK_IMAGE_SUPPORT; +#ifdef __linux__ + HipTest::HIP_SKIP_TEST("Mipmap APIs are not supported on Linux"); + return; +#endif //__linux__ + hipmipmappedArray array; HIP_ARRAY3D_DESCRIPTOR desc = {};