SWDEV-555295 - Fix and enable Unit_hipFreeAsync_Negative_Parameters (#991)

This commit is contained in:
marandje
2025-10-22 15:57:54 +02:00
committed by GitHub
parent 920b33c0b9
commit aa4dee57b5
3 changed files with 1 additions and 12 deletions
@@ -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<void**>(&p), alloc_size, stream.stream()));
HIP_CHECK(hipStreamSynchronize(stream.stream()));
HIP_CHECK_ERROR(hipFreeAsync(p, reinterpret_cast<hipStream_t>(-1)), hipErrorInvalidHandle);
HIP_CHECK(hipFreeAsync(reinterpret_cast<void*>(p), stream.stream()));
HIP_CHECK(hipStreamSynchronize(stream.stream()));
HIP_CHECK(hipFreeAsync(nullptr, stream.stream()));
}
SECTION("Double free") {