Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
Adam Litke has submitted this change and it was merged. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. testlib: Use osutils.close_fd to avoid fd leaks If a child process exit when we close a file descriptor, the call may be interrupted, and we would not close the next fd. Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Signed-off-by: Nir Soffer Reviewed-on: https://gerrit.ovirt.org/61216 Reviewed-by: Adam Litke --- M tests/testlib.py 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Nir Soffer: Verified; Passed CI tests Adam Litke: Looks good to me, approved Objections: Jenkins CI: Failed CI tests -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
gerrit-hooks has posted comments on this change. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
Nir Soffer has posted comments on this change. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. Patch Set 3: Verified+1 -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
Nir Soffer has posted comments on this change. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. Patch Set 3: Continuous-Integration+1 CI seems to be sick, tests pass locally. -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
gerrit-hooks has posted comments on this change. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
gerrit-hooks has posted comments on this change. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
Adam Litke has posted comments on this change. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
gerrit-hooks has posted comments on this change. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: testlib: Use osutils.close_fd to avoid fd leaks
Nir Soffer has uploaded a new change for review. Change subject: testlib: Use osutils.close_fd to avoid fd leaks .. testlib: Use osutils.close_fd to avoid fd leaks If a child process exit when we close a file descriptor, the call may be interrupted, and we would not close the next fd. Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Signed-off-by: Nir Soffer --- M tests/testlib.py 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/16/61216/1 diff --git a/tests/testlib.py b/tests/testlib.py index aa44737..0246b17 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -50,6 +50,8 @@ import vdsm +from vdsm.common import osutils + from monkeypatch import Patch from testValidation import SlowTestsPlugin, StressTestsPlugin @@ -519,8 +521,8 @@ e = pickle.loads(os.read(r, 4006)) raise e finally: -os.close(r) -os.close(w) +osutils.close_fd(r) +osutils.close_fd(w) return wrapper -- To view, visit https://gerrit.ovirt.org/61216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c8d2b7e29cc7df751d4fc1954ad3f3cae6917ce Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org