2
0

kfdtest: Consolidate logic for ASSERT vs EXPECT

ASSERT failures result in immediate termination of the test. EXPECT
returns a failure but continues execution. Reserve ASSERT for required
functionality (node initialization, queue creation, etc) where the rest
of the test cannot run if that call fails. Use EXPECT everywhere else

Change-Id: I1c11326fc3ae22b50fa83b07b3b49af1e1f4e69e


[ROCm/ROCR-Runtime commit: fe33461622]
Este cometimento está contido em:
Kent Russell
2018-08-20 09:54:26 -04:00
ascendente b86f145610
cometimento 52536ba23b
17 ficheiros modificados com 208 adições e 209 eliminações
+4 -4
Ver ficheiro
@@ -163,11 +163,11 @@ TEST_F(KFDDBGTest, BasicAddressWatch) {
dispatch.Sync(g_TestTimeOut);
// Check that we got trap handler calls due to add watch triggers
ASSERT_GE(*(tmaBuf.As<unsigned int*>()+ TMA_TRAP_COUNT_OFFSET), TMA_TRAP_COUNT_VALUE);
EXPECT_GE(*(tmaBuf.As<unsigned int*>()+ TMA_TRAP_COUNT_OFFSET), TMA_TRAP_COUNT_VALUE);
ASSERT_SUCCESS(hsaKmtDbgUnregister(defaultGPUNode));
ASSERT_SUCCESS(queue.Destroy());
ASSERT_SUCCESS(queue_flush.Destroy());
EXPECT_SUCCESS(hsaKmtDbgUnregister(defaultGPUNode));
EXPECT_SUCCESS(queue.Destroy());
EXPECT_SUCCESS(queue_flush.Destroy());
} else {
LOG() << "Skipping test: Test not supported on family ID 0x" << m_FamilyId << "." << std::endl;
}