From 56bbd862e629f226f9de8bfca752fc5cf939fff4 Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Tue, 23 Apr 2019 07:11:12 -0400 Subject: [PATCH] Fix test if Render Node can't be found If a Render Node can't be found, we should finish off all child processes immediately, then return. Trying to do the check before forking the children results in the test failing as well, regardless of the status of finding the render node, which is likely why the forking occurred first in the test's initial creation. This way we ensure that things finish cleanly before moving to the next test Change-Id: I2e1b62fed25c30ff1f179612127c23960da4ee5e [ROCm/ROCR-Runtime commit: e109ce541c9fcfd636f775df171322953852af82] --- projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp b/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp index 0a1bf506c0..cd530c7464 100644 --- a/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp +++ b/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp @@ -341,6 +341,7 @@ TEST_F(KFDEvictTest, BasicTest) { int rn = FindDRMRenderNode(defaultGPUNode); if (rn < 0) { LOG() << "Skipping test: Could not find render node for default GPU." << std::endl; + WaitChildProcesses(); return; } @@ -551,6 +552,7 @@ TEST_F(KFDEvictTest, QueueTest) { int rn = FindDRMRenderNode(defaultGPUNode); if (rn < 0) { LOG() << "Skipping test: Could not find render node for default GPU." << std::endl; + WaitChildProcesses(); return; }