def _test_ShutdownParent(self, node):
self._setupDevices(node)
# test aggregate device releaseObject functionality
pids = getChildren(self._devBooter.pid)
self._parentDevice.releaseObject()
for pid in pids:
number_attempts = 0
while True:
try:
os.kill(pid, 0) # check to see if the process is still alive
time.sleep(0.5)
number_attempts+=1
except:
break
if number_attempts == 5:
break
pids = getChildren(self._devBooter.pid)
self.assertEqual(len(self._devMgr._get_registeredDevices()), 0)
# make sure the child device was also released
self.assertEqual(len(pids), 0)
self._devMgr.shutdown()
self.assert_(self.waitTermination(self._devBooter))
self.assertEqual(len(self._domMgr._get_deviceManagers()), 0)
test_06_AggregateDevice.py 文件源码
python
阅读 36
收藏 0
点赞 0
评论 0
评论列表
文章目录