Nir Soffer has uploaded a new change for review.
Change subject: tests: Remove hack for devices with same names
......................................................................
tests: Remove hack for devices with same names
After the test isolation issues in tcTests.py and ipwrapperTests.py were
resolved, we are not expecting setup to fail because a device with same
name exists, so we can remove the hack that used to skip tests.
It is possible that slaves contains stale devices from previous run of
the broken tests, but this should be solved by cleaning the slaves, not
by hiding the error and skipping tests.
Change-Id: I675e57756859ca7ffe272607b7f528c281c65256
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/tcTests.py
1 file changed, 1 insertion(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/44166/1
diff --git a/tests/tcTests.py b/tests/tcTests.py
index dbbac95..942f63f 100644
--- a/tests/tcTests.py
+++ b/tests/tcTests.py
@@ -87,17 +87,7 @@
class _Bridge(_Interface):
def addDevice(self):
- try:
- check_call([EXT_BRCTL, 'addbr', self.devName])
- except ExecError as e:
- # FIXME: we do not know why we sometime see the same bridge names
- # on jenkins slaves. This is an ugly hack to mitigate the issue,
- # since it is certainly not the fault of the test case
- if "can't create bridge with the same name" in e.err:
- raise SkipTest(e.err)
- else:
- raise
-
+ check_call([EXT_BRCTL, 'addbr', self.devName])
# learning interval is different on different kernels, so set it
# explicit for 2.x kernels
if os.uname()[2].startswith("2"):
--
To view, visit https://gerrit.ovirt.org/44166
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I675e57756859ca7ffe272607b7f528c281c65256
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Nir Soffer has uploaded a new change for review.
Change subject: tests: Fix ipwrapper tests isolation
......................................................................
tests: Fix ipwrapper tests isolation
Similar to tcTests, tests were sharing same devices, so failure to
delete a device would cause unrelated test to fail.
Even worse, the Unicode tests used *same* device name on all tests. So
running concurrent tests is not possible, and once we fail to delete a
device, all builds will fail on this slave when tyring to create the
same device again. This issue was hidden previously because we used to
skip silently such failures.
Now we use Unicode prefix with random suffix, so stale devices are
unlikely to cause failures in other builds.
To simplify cleanup, the Unicode tests was moved to its own test case
class. To make it easier to work with the Unicode bridge name, we use
plain ASCII ("\xd7\x90\xd7\x91\xd7\x92") instead of raw utf-8 ("אבג").
Change-Id: Ic02b3945a029476f17601608555430dc2fb710de
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/ipwrapperTests.py
1 file changed, 24 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/44165/1
diff --git a/tests/ipwrapperTests.py b/tests/ipwrapperTests.py
index d75a537..bd3007d 100644
--- a/tests/ipwrapperTests.py
+++ b/tests/ipwrapperTests.py
@@ -92,11 +92,11 @@
class TestLinks(TestCaseBase):
- _bridge = tcTests._Bridge()
@ValidateRunningAsRoot
def setUp(self):
tcTests._checkDependencies()
+ self._bridge = tcTests._Bridge()
self._bridge.addDevice()
def tearDown(self):
@@ -110,34 +110,46 @@
class TestDrvinfo(TestCaseBase):
- _bridge = tcTests._Bridge()
- _unicode_bridge = tcTests._Bridge()
@ValidateRunningAsRoot
def setUp(self):
tcTests._checkDependencies()
+ self._bridge = tcTests._Bridge()
self._bridge.addDevice()
- self._unicode_bridge.devName = 'test-トトロ'
- self._unicode_bridge.addDevice()
def tearDown(self):
self._bridge.delDevice()
- self._unicode_bridge.delDevice()
def testBridgeEthtoolDrvinfo(self):
self.assertEqual(ipwrapper.drv_name(self._bridge.devName),
ipwrapper.LinkType.BRIDGE)
- def testUtf8BridgeEthtoolDrvinfo(self):
- self.assertEqual(
- ipwrapper.drv_name(self._unicode_bridge.devName.decode('utf8')),
- ipwrapper.LinkType.BRIDGE)
-
- def testTogglePromisc(self):
+ def testEnablePromisc(self):
ipwrapper.getLink(self._bridge.devName).promisc = True
self.assertTrue(ipwrapper.getLink(self._bridge.devName).promisc,
"Could not enable promiscuous mode.")
+ def testDisablePromisc(self):
+ ipwrapper.getLink(self._bridge.devName).promisc = True
ipwrapper.getLink(self._bridge.devName).promisc = False
self.assertFalse(ipwrapper.getLink(self._bridge.devName).promisc,
"Could not disable promiscuous mode.")
+
+
+class TestUnicodeDrvinfo(TestCaseBase):
+
+ @ValidateRunningAsRoot
+ def setUp(self):
+ tcTests._checkDependencies()
+ # First 3 Hebrew letters
+ # See http://unicode.org/charts/PDF/U0590.pdf
+ self._bridge = tcTests._Bridge("\xd7\x90\xd7\x91\xd7\x92")
+ self._bridge.addDevice()
+
+ def tearDown(self):
+ self._bridge.delDevice()
+
+ def testUtf8BridgeEthtoolDrvinfo(self):
+ self.assertEqual(
+ ipwrapper.drv_name(self._bridge.devName.decode('utf8')),
+ ipwrapper.LinkType.BRIDGE)
--
To view, visit https://gerrit.ovirt.org/44165
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic02b3945a029476f17601608555430dc2fb710de
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: Isolate tcTests test properly
......................................................................
tests: Isolate tcTests test properly
Tests were sharing same devices - this is huge anti-pattern, as failure
to delete a device in one test will cause the next test setup to fail.
Devices are created now in setUp() so each test has its own devices.
Since tearDown() is not called if setUp() failed, setUp() is cleaning up
on failures.
tearDown() was aborting early on the first error, possibly leaving stale
devices around (breaking the next tests). Now all errors are logged and
tearDown will fail if some devices could not be removed, revealing the
errors in captured log.
Change-Id: I3861ccfb432541b63d7ba5814f7e3ae339ec8105
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-on: https://gerrit.ovirt.org/44144
Reviewed-by: Ido Barkan <ibarkan(a)redhat.com>
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/tcTests.py
1 file changed, 41 insertions(+), 23 deletions(-)
Approvals:
Nir Soffer: Verified
Ido Barkan: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/44144
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3861ccfb432541b63d7ba5814f7e3ae339ec8105
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Dan Kenigsberg has uploaded a new change for review.
Change subject: call stop_event_loop upon exit
......................................................................
call stop_event_loop upon exit
For cleanliness, whomever starts a thread should stop it when it is no
longer needed.
Change-Id: I9ab0d9b7be976e37a89a96d2f09a353186008731
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vdsm
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/26532/1
diff --git a/vdsm/vdsm b/vdsm/vdsm
index 652797c..fd9b3f8 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -81,6 +81,7 @@
signal.pause()
finally:
cif.prepareForShutdown()
+ libvirtconnection.stop_event_loop()
def run(pidfile=None):
--
To view, visit http://gerrit.ovirt.org/26532
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ab0d9b7be976e37a89a96d2f09a353186008731
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Martin Polednik has uploaded a new change for review.
Change subject: vdsm: drop cluster version < 3.6 for ppc64le
......................................................................
vdsm: drop cluster version < 3.6 for ppc64le
Due to moving from powerKVM to ppc64le, we should not support older
cluster levels in newest VDSM for POWER8 platform.
I5c55f66aa526a6b9498f557c964ee18888f72885
Change-Id: Ibda0fc1b3716fa9be361a0f60e3639395bb9a174
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M vdsm/dsaversion.py.in
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/43892/1
diff --git a/vdsm/dsaversion.py.in b/vdsm/dsaversion.py.in
index 374580d..41f6266 100644
--- a/vdsm/dsaversion.py.in
+++ b/vdsm/dsaversion.py.in
@@ -18,6 +18,8 @@
# Refer to the README and COPYING files for full details of the license
#
+import platform
+
"""
This module provides DSA software versioning information for
python based components
@@ -36,3 +38,6 @@
'supportedENGINEs': ['3.4', '3.5', '3.6'],
'clusterLevels': ['3.4', '3.5', '3.6'],
}
+
+if platform.machine() == 'ppc64le':
+ version_info['clusterLevels'] = ['3.6']
--
To view, visit https://gerrit.ovirt.org/43892
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibda0fc1b3716fa9be361a0f60e3639395bb9a174
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>