diff --git a/tests/catch/include/hip_test_common.hh b/tests/catch/include/hip_test_common.hh index ed8412b673..5f7b197596 100644 --- a/tests/catch/include/hip_test_common.hh +++ b/tests/catch/include/hip_test_common.hh @@ -397,7 +397,6 @@ static inline void runKernelForDuration(std::chrono::milliseconds duration, static size_t ticksPerSecond = findTicksPerSecond(); const auto millis = duration.count(); hipLaunchKernelGGL(waitKernel, dim3(1), dim3(1), 0, stream, ticksPerSecond * millis / 1000); - HIP_CHECK(hipGetLastError()); } } // namespace HipTest diff --git a/tests/catch/unit/event/hipEventSynchronize.cc b/tests/catch/unit/event/hipEventSynchronize.cc index e3c07bb395..a347badb22 100644 --- a/tests/catch/unit/event/hipEventSynchronize.cc +++ b/tests/catch/unit/event/hipEventSynchronize.cc @@ -110,13 +110,13 @@ TEST_CASE("Unit_hipEventSynchronize_NoEventRecord_Positive") { // Record the end_event HIP_CHECK(hipEventRecord(end_event, NULL)); + // End event has not been completed + HIP_CHECK_ERROR(hipEventQuery(end_event), hipErrorNotReady); // When hipEventSynchronized is called on event that has not been recorded, // the function returns immediately HIP_CHECK(hipEventSynchronize(dummy_event)); - // End event has not been completed - HIP_CHECK_ERROR(hipEventQuery(end_event), hipErrorNotReady); // Wait for end_event to complete HIP_CHECK(hipEventSynchronize(end_event));