SWDEV-555295 - Fix and enable Unit_hipFreeAsync_Negative_Parameters (#991)
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user