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
这个提交包含在:
1 父节点
7bb49582db
当前提交
9cffda4ebb
33 个文件已更改
+142
-38
没有与搜索条件相匹配的文件
@@ -167,13 +167,13 @@ TEST_CASE("Unit_hipGraphExecMemsetNodeSetParams_Negative_Parameters") {
|
||||
SECTION("Changing dst allocation device") {
|
||||
if (HipTest::getDeviceCount() < 2) {
|
||||
HipTest::HIP_SKIP_TEST("Test requires two connected GPUs");
|
||||
return;
|
||||
} else {
|
||||
HIP_CHECK(hipSetDevice(1));
|
||||
LinearAllocGuard<int> new_alloc(LinearAllocs::hipMalloc, 4 * sizeof(int));
|
||||
params.dst = new_alloc.ptr();
|
||||
HIP_CHECK_ERROR(hipGraphExecMemsetNodeSetParams(graph_exec, node, ¶ms),
|
||||
hipErrorInvalidValue);
|
||||
}
|
||||
HIP_CHECK(hipSetDevice(1));
|
||||
LinearAllocGuard<int> new_alloc(LinearAllocs::hipMalloc, 4 * sizeof(int));
|
||||
params.dst = new_alloc.ptr();
|
||||
HIP_CHECK_ERROR(hipGraphExecMemsetNodeSetParams(graph_exec, node, ¶ms),
|
||||
hipErrorInvalidValue);
|
||||
}
|
||||
|
||||
HIP_CHECK(hipGraphExecDestroy(graph_exec));
|
||||
|
||||
在新工单中引用
屏蔽一个用户