def test(self): args = [EXT_SLEEP, "4"] sproc = utils.execCmd(args, sync=False, sudo=False) try: self.assertEquals(misc.getCmdArgs(sproc.pid), tuple(args)) finally: sproc.kill() sproc.wait()
def testZombie(self): args = [EXT_SLEEP, "0"] sproc = utils.execCmd(args, sync=False, sudo=False) sproc.kill() try: test = lambda: self.assertEquals(misc.getCmdArgs(sproc.pid), tuple()) utils.retry(AssertionError, test, tries=10, sleep=0.1) finally: sproc.wait()