Nir Soffer has posted comments on this change. Change subject: functional tests: fix supervdsmServer test ......................................................................
Patch Set 16: Code-Review-1 (2 comments) https://gerrit.ovirt.org/#/c/61902/16//COMMIT_MSG Commit Message: Line 9: supervdsmServer dropPrivileges function is switching root user to Line 10: a non privileged user but not switching the user back to root. It causes Line 11: other tests which require root user to fail. Line 12: it's not possible to switch to root from non privileged user so Line 13: every test is done in a seprate process so the user won't be changed It is possible to switch to root from non-privilege user, but you have to use setreuid(2): - https://docs.python.org/2/library/os.html#os.setreuid - http://man7.org/linux/man-pages/man2/setreuid.2.html Line 14: Line 15: Change-Id: I8c7e381809261cf330ef4f19c3fec5cd38254b1b https://gerrit.ovirt.org/#/c/61902/16/tests/functional/supervdsmFuncTests.py File tests/functional/supervdsmFuncTests.py: Line 34: class TestSuperVdsmRemotly(TestCaseBase): Line 35: def testPingCall(self): Line 36: p = subprocess.Popen( Line 37: ['/usr/share/vdsm/tests/run_tests.sh', Line 38: 'functional/supervdsm_ping_call.py'] You don't need this, we have @forked decorator for running tests in a child process. Line 39: ) Line 40: p.communicate() Line 41: self.assertEqual(p.returncode, 0) Line 42: -- To view, visit https://gerrit.ovirt.org/61902 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c7e381809261cf330ef4f19c3fec5cd38254b1b Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman <igoih...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Irit Goihman <igoih...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org