def _test_keepalived_respawns(self, normal_exit=True):
        process = self._spawn_keepalived(self.manager)
        pid = process.pid
        exit_code = '-15' if normal_exit else '-9'

        # Exit the process, and see that when it comes back
        # It's indeed a different process
        utils.execute(['kill', exit_code, pid], run_as_root=True)
        utils.wait_until_true(
            lambda: process.active and pid != process.pid,
            timeout=5,
            sleep=0.01,
            exception=RuntimeError(_("Keepalived didn't respawn")))
dataset/ETHPy150Open openstack/neutron/neutron/tests/functional/agent/linux/test_keepalived.py/KeepalivedManagerTestCase._test_keepalived_respawns/original