Nir Soffer has posted comments on this change.

Change subject: tests: InterfaceSampleTests are failing with IOError
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/38113/2/lib/vdsm/libvirtconnection.py
File lib/vdsm/libvirtconnection.py:

Line 77: __connectionLock = threading.Lock()
Line 78: 
Line 79: 
Line 80: def _read_password():
Line 81:     if os.path.exists(constants.P_VDSM_LIBVIRT_PASSWD):
This is racy - use:

    try:
        open it
    except IOError with errno == ENOENT:
        use alternative

But is the alternative path the correct solution?

Looks like bad tests to me - they should not access
the file system on a developer machine.
Line 82:         with open(constants.P_VDSM_LIBVIRT_PASSWD) as passwd_file:
Line 83:             return passwd_file.readline().rstrip("\n")
Line 84:     else:
Line 85:         with open(constants.P_VDSM_SRC_LIBVIRT_PASSWD) as passwd_file:


-- 
To view, visit https://gerrit.ovirt.org/38113
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1de7ed2222c9f531d490ffdd3f71a3130faf63b
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Madhu Pavan <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to