Nir Soffer has posted comments on this change. Change subject: terminating tests - verify process death ......................................................................
Patch Set 1: (2 comments) https://gerrit.ovirt.org/#/c/52362/1/tests/utilsTests.py File tests/utilsTests.py: Line 78: Line 79: class TerminatingTests(TestCaseBase): Line 80: def testTerminating(self): Line 81: proc = commands.execCmd([EXT_SLEEP, "5"], sync=False) Line 82: pids = utils.pgrep(EXT_SLEEP) Lets check /proc/pid instead of using pgrep. Line 83: # verify process is up and running Line 84: self.assertTrue(proc.pid in pids) Line 85: with utils.terminating(proc): Line 86: # do whatever with proc Line 86: # do whatever with proc Line 87: pass Line 88: # here process should not exist Line 89: pids = utils.pgrep(EXT_SLEEP) Line 90: self.assertFalse(proc.pid in pids) We can do: self.assertFalse(os.path.exists("/proc/pid")) Line 91: Line 92: Line 93: class RetryTests(TestCaseBase): Line 94: def testStopCallback(self): -- To view, visit https://gerrit.ovirt.org/52362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1600a298b3faaffe3cc72b4eb62201370bf03c7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
