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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user