Change in vdsm[master]: tests: InterfaceSampleTests are failing with IOError

nsoffer at redhat.com nsoffer at redhat.com
Wed Feb 25 08:00:20 UTC 2015


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 <kmp at linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list