SWDEV-485763 - Fix memory leaks in various unit tests

Fix memory leaks by adding missing destroy calls for
events, streams, and graphs at the end of tests.

Ensure that every test case executes destroy calls,
regardless of whether it passes or fails.

Change-Id: I814e35c528d90ed2abb34d77377f1a7fd3f1f11c


[ROCm/hip-tests commit: 9cffda4ebb]
Этот коммит содержится в:
Marko Arandjelovic
2024-09-20 18:04:35 +02:00
родитель d9482cf69c
Коммит fe9860bd47
33 изменённых файлов: 142 добавлений и 38 удалений
+2
Просмотреть файл
@@ -254,6 +254,7 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_Positive_Parameters") {
start_event, nullptr));
HIP_CHECK(hipDeviceSynchronize());
HIP_CHECK(hipEventQuery(start_event));
HIP_CHECK(hipEventDestroy(start_event));
}
SECTION("Pass only stop event") {
@@ -265,6 +266,7 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_Positive_Parameters") {
nullptr, stop_event));
HIP_CHECK(hipDeviceSynchronize());
HIP_CHECK(hipEventQuery(stop_event));
HIP_CHECK(hipEventDestroy(stop_event));
}
}