Saggi Mizrahi has posted comments on this change.
Change subject: tests: add iscsi storage functional test
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(5 inline comments)
....................................................
File tests/functional/xmlrpcTests.py
Line 26: from contextlib import contextmanager
Line 27:
Line 28: from testrunner import VdsmTestCase as TestCaseBase
Line 29: from nose.plugins.skip import SkipTest
Line 30: import rtslib
Skip tests if rtslib doesn't exist. You shouldn't force all users to have that
installed.
Also, the EL6 test servers can't have that installed
Line 31:
Line 32: from vdsm.config import config
Line 33: from vdsm.constants import VDSM_USER, VDSM_GROUP, QEMU_PROCESS_USER,
EXT_SUDO
Line 34: import storage.sd
Line 422: connections = {}
Line 423: for uuid, conn in backendDef.iteritems():
Line 424: fd, imgPath = tempfile.mkstemp()
Line 425: rollback.prependDefer(
Line 426: lambda imgPath=imgPath: os.unlink(imgPath))
You should use partial and not lambdas
Lambdas resolve the args upon execution and partial resolves upon object
initialization.
The latter is obviously more intuitive and what you are trying to do.
Line 427: rollback.prependDefer(
Line 428: lambda fd=fd: os.close(fd))
Line 429: # Create a 10GB empty disk image
Line 430: os.ftruncate(fd, 1024 ** 3 * 10)
Line 440: r = self.s.storageServer_ConnectionRefs_acquire(connections)
Line 441: self.asserts.assertVdsOK(r)
Line 442:
Line 443: def releaseConnection():
Line 444: import time
Import mid file?
Line 445: time.sleep(30)
Line 446: r = self.s.storageServer_ConnectionRefs_release(
Line 447: connections.keys())
Line 448: time.sleep(30)
Line 441: self.asserts.assertVdsOK(r)
Line 442:
Line 443: def releaseConnection():
Line 444: import time
Line 445: time.sleep(30)
30 seconds is quit a lot
Line 446: r = self.s.storageServer_ConnectionRefs_release(
Line 447: connections.keys())
Line 448: time.sleep(30)
Line 449: # Test will fail if we do not sleep.
Line 444: import time
Line 445: time.sleep(30)
Line 446: r = self.s.storageServer_ConnectionRefs_release(
Line 447: connections.keys())
Line 448: time.sleep(30)
I think you need to figure out these sleep problems. Catch me on IRC if you
need help.
Line 449: # Test will fail if we do not sleep.
Line 450: # The LUN is still occupied, and iscsiadm still have
avtive
Line 451: # sessions even if we remove the storage domain and pools
and
Line 452: # connections. Why ?
--
To view, visit http://gerrit.ovirt.org/9842
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icaef5d6145b8f493b5eaab0b75564f88a4cb82ce
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches