Francesco Romani has uploaded a new change for review. Change subject: tests: more affinity tests for execCmd ......................................................................
tests: more affinity tests for execCmd Add test to execCmd to ensure the default behaviour, without any affinity set, is correct. This patch was split from the parent one to avoid further delay. Change-Id: I52a1270c6793dfdb565edc96f69a3ccdc327eaec Signed-off-by: Francesco Romani <[email protected]> --- M tests/utilsTests.py 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/46297/1 diff --git a/tests/utilsTests.py b/tests/utilsTests.py index cfd615f..6e50aa0 100644 --- a/tests/utilsTests.py +++ b/tests/utilsTests.py @@ -518,8 +518,19 @@ CPU_LIST = ['0'] @forked + @MonkeyPatch(utils, '_USING_CPU_AFFINITY', False) + def testResetAffinityByDefault(self): + try: + proc = utils.execCmd((EXT_SLEEP, '30s'), sync=False) + + self.assertEquals(taskset.get(proc.pid), + online_cpus()) + finally: + proc.kill() + + @forked @MonkeyPatch(utils, '_USING_CPU_AFFINITY', True) - def testResetAffinity(self): + def testResetAffinityWhenConfigured(self): taskset.set(os.getpid(), self.CPU_LIST) self.assertEquals(taskset.get(os.getpid()), self.CPU_LIST) -- To view, visit https://gerrit.ovirt.org/46297 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52a1270c6793dfdb565edc96f69a3ccdc327eaec Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
