kfdtest: fix dispatch pointers and event leaks tests
KFDDBGTest and KFDNegative test can eat into memory and event resources for subsequent test interations if unallocated. Change-Id: Iea170c20df8d487703441181b6c152b61f02d3db
Este cometimento está contido em:
cometido por
Jonathan Kim
ascendente
f047f96161
cometimento
26d338df12
@@ -307,6 +307,8 @@ TEST_F(KFDDBGTest, HitTrapEvent) {
|
||||
|
||||
debug->Detach();
|
||||
hsaKmtRuntimeDisable();
|
||||
|
||||
delete dispatch;
|
||||
} else {
|
||||
LOG() << "Skipping test: Test not supported on family ID 0x"
|
||||
<< m_FamilyId << "." << std::endl;
|
||||
@@ -391,6 +393,7 @@ TEST_F(KFDDBGTest, HitTrapOnWaveStartEndEvent) {
|
||||
ASSERT_EQ(trapMask, KFD_EC_MASK(EC_QUEUE_WAVE_TRAP) | KFD_EC_MASK(EC_QUEUE_NEW));
|
||||
|
||||
dispatch->Sync();
|
||||
delete dispatch;
|
||||
}
|
||||
|
||||
EXPECT_SUCCESS(queue.Destroy());
|
||||
@@ -477,6 +480,8 @@ TEST_F(KFDDBGTest, SuspendQueues) {
|
||||
|
||||
debug->Detach();
|
||||
hsaKmtRuntimeDisable();
|
||||
|
||||
delete dispatch;
|
||||
} else {
|
||||
LOG() << "Skipping test: Test not supported on family ID 0x"
|
||||
<< m_FamilyId << "." << std::endl;
|
||||
@@ -540,11 +545,10 @@ TEST_F(KFDDBGTest, HitMemoryViolation) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Dispatch *dispatch;
|
||||
dispatch = new Dispatch(isaBuf);
|
||||
dispatch->SetDim(1, 1, 1);
|
||||
dispatch->SetPriv(false); //Override GFX11 CWSR WA
|
||||
dispatch->Submit(queue);
|
||||
Dispatch dispatch(isaBuf);
|
||||
dispatch.SetDim(1, 1, 1);
|
||||
dispatch.SetPriv(false); //Override GFX11 CWSR WA
|
||||
dispatch.Submit(queue);
|
||||
|
||||
// Queue immediately dies so halt process for tracer device inspection.
|
||||
raise(SIGSTOP);
|
||||
|
||||
@@ -95,6 +95,7 @@ TEST_F(KFDNegativeTest, BasicPipeReset) {
|
||||
EXPECT_EQ(resetEvent->EventData.EventType, HSA_EVENTTYPE_HW_EXCEPTION);
|
||||
|
||||
LOG() << "Child ==> Complete" << std::endl;
|
||||
|
||||
exit(0);
|
||||
} else {
|
||||
int childStatus = 0;
|
||||
@@ -125,6 +126,7 @@ TEST_F(KFDNegativeTest, BasicPipeReset) {
|
||||
EXPECT_TRUE(WaitOnValue(destBuf.As<unsigned int*>(), 0));
|
||||
|
||||
hsaKmtDestroyEvent(event);
|
||||
hsaKmtDestroyEvent(resetEvent);
|
||||
EXPECT_SUCCESS(queue.Destroy());
|
||||
|
||||
LOG() << "Parent ==> Complete" << std::endl;
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador