From d32df0957cceb42f4bde1fa0d0a3d71447bbb91c Mon Sep 17 00:00:00 2001 From: Tao Sang Date: Thu, 27 Jun 2024 10:53:21 -0400 Subject: [PATCH] SWDEV-467540 - Verify awaitCompletion() Update the existing test case to verify awaitCompletion() for unfinished command. Change-Id: I0fbcdba9ffb8633d861312c221ac12df1772c6e6 [ROCm/hip-tests commit: 3e0b749b76704f60ac089b4fad45623685e1d0d7] --- .../hip-tests/catch/unit/stream/hipStreamDestroy.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc b/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc index a2c0f287ec..40b98be674 100644 --- a/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc +++ b/projects/hip-tests/catch/unit/stream/hipStreamDestroy.cc @@ -83,8 +83,14 @@ TEST_CASE("Unit_hipStreamDestroy_WithPendingWork") { LaunchDelayKernel(std::chrono::milliseconds(500), stream); setToOne<<<1, numDataPoints, 0, stream>>>(deviceData, numDataPoints); - HIP_CHECK_ERROR(hipStreamQuery(stream), hipErrorNotReady); - HIP_CHECK_ERROR(hipStreamQuery(nullptr), hipErrorNotReady); + SECTION("Without stream query") { + fprintf(stderr, "Without stream query\n"); + } + SECTION("With stream query") { + fprintf(stderr, "With stream query\n"); + HIP_CHECK_ERROR(hipStreamQuery(stream), hipErrorNotReady); + HIP_CHECK_ERROR(hipStreamQuery(nullptr), hipErrorNotReady); + } HIP_CHECK(hipStreamDestroy(stream)); checkDataSet(deviceData); HIP_CHECK(hipFree(deviceData));