From aa4dee57b5c60089d643c291dd02704ea1930cb8 Mon Sep 17 00:00:00 2001 From: marandje Date: Wed, 22 Oct 2025 15:57:54 +0200 Subject: [PATCH] SWDEV-555295 - Fix and enable Unit_hipFreeAsync_Negative_Parameters (#991) --- .../catch/hipTestMain/config/config_amd_linux | 1 - .../catch/hipTestMain/config/config_nvidia_linux.json | 2 -- projects/hip-tests/catch/unit/memory/hipFreeAsync.cc | 10 +--------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux index 0d808d4d79..41676ae7ff 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux @@ -564,7 +564,6 @@ "Unit_Device___hiloint2double_Positive", "Unit_Device___hiloint2double_Negative_RTC", "SWDEV-447384, SWDEV-447932: These tests fail in gfx1100, gfx1101 & gfx1102", - "Unit_hipFreeAsync_Negative_Parameters", "SWDEV-445928: These tests fail in PSDB stress test on 09/02/2024", "Unit_hipDestroySurfaceObject_Negative_Parameters", "Unit_Device___float2half_rd_Accuracy_Limited_Positive", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json index 636f1d006a..d488afdc06 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json +++ b/projects/hip-tests/catch/hipTestMain/config/config_nvidia_linux.json @@ -13,8 +13,6 @@ "Unit_ChannelDescriptor_Positive_Basic_3D - long3", "Unit_ChannelDescriptor_Positive_Basic_4D - ulong4", "Unit_ChannelDescriptor_Positive_Basic_4D - long4", - "=== Below test fails in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/38 ===", - "Unit_hipFreeAsync_Negative_Parameters", "=== Below test fails in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/92 ===", "Unit_hipGetTexObjectResourceDesc_positive", "Unit_hipGetTexObjectResourceDesc_Negative_Parameters", diff --git a/projects/hip-tests/catch/unit/memory/hipFreeAsync.cc b/projects/hip-tests/catch/unit/memory/hipFreeAsync.cc index d2ba8dd2a9..9649759626 100644 --- a/projects/hip-tests/catch/unit/memory/hipFreeAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipFreeAsync.cc @@ -57,15 +57,7 @@ TEST_CASE("Unit_hipFreeAsync_Negative_Parameters") { StreamGuard stream(Streams::created); SECTION("dev_ptr is nullptr") { - HIP_CHECK_ERROR(hipFreeAsync(nullptr, stream.stream()), hipErrorInvalidValue); - } - - SECTION("Invalid stream handle") { - HIP_CHECK(hipMallocAsync(reinterpret_cast(&p), alloc_size, stream.stream())); - HIP_CHECK(hipStreamSynchronize(stream.stream())); - HIP_CHECK_ERROR(hipFreeAsync(p, reinterpret_cast(-1)), hipErrorInvalidHandle); - HIP_CHECK(hipFreeAsync(reinterpret_cast(p), stream.stream())); - HIP_CHECK(hipStreamSynchronize(stream.stream())); + HIP_CHECK(hipFreeAsync(nullptr, stream.stream())); } SECTION("Double free") {