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]
Esse commit está contido em:
Kent Russell
2018-08-20 09:54:26 -04:00
commit 52536ba23b
17 arquivos alterados com 208 adições e 209 exclusões
@@ -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();