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:
@@ -89,7 +89,7 @@ TEST_F(RDMATest, GPUDirect) {
|
||||
dispatch.Submit(queue);
|
||||
dispatch.Sync(g_TestTimeOut); // GPU executed the command
|
||||
|
||||
ASSERT_SUCCESS(queue.Destroy());
|
||||
EXPECT_SUCCESS(queue.Destroy());
|
||||
|
||||
LocalMemoryAccess Rdma;
|
||||
|
||||
@@ -109,7 +109,7 @@ TEST_F(RDMATest, GPUDirect) {
|
||||
/* Read the memory to confirm that application can read the local memory
|
||||
* correctly from the mapped address.
|
||||
*/
|
||||
ASSERT_EQ(memcmp(gpuAddr, srcSysBuffer.As<void*>(), 4), 0);
|
||||
EXPECT_EQ(memcmp(gpuAddr, srcSysBuffer.As<void*>(), 4), 0);
|
||||
|
||||
Rdma.UnMap(gpuAddr, PAGE_SIZE);
|
||||
Rdma.Close();
|
||||
|
||||
Reference in New Issue
Block a user