Dan Kenigsberg has uploaded a new change for review.
Change subject: py3: make network/tc_test pass ......................................................................
py3: make network/tc_test pass
Change-Id: I544446358e611a0507aad7d7df4ab6c57ad5bdf0 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M tests/Makefile.am M tests/network/tc_test.py 2 files changed, 8 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/63198/1
diff --git a/tests/Makefile.am b/tests/Makefile.am index 2dce548..7243e50 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -201,7 +201,6 @@ network/ovs_driver_test.py \ network/ovs_info_test.py \ network/ovs_test.py \ - network/tc_test.py \ network/unified_persistence_test.py \ numaUtilsTests.py \ outOfProcessTests.py \ diff --git a/tests/network/tc_test.py b/tests/network/tc_test.py index 7ac30c0..12bd17e 100644 --- a/tests/network/tc_test.py +++ b/tests/network/tc_test.py @@ -25,14 +25,14 @@ import os import sys from binascii import unhexlify -from itertools import izip_longest from subprocess import Popen, PIPE
from nose.plugins.attrib import attr
import six +from six.moves import zip_longest
-from hostdevTests import Connection +from vmfakecon import Connection from testlib import (VdsmTestCase as TestCaseBase, permutations, expandPermutations) from testValidation import ValidateRunningAsRoot, stresstest @@ -170,8 +170,8 @@ with open(path) as tc_filter_show: data = tc_filter_show.read()
- for parsed, correct in izip_longest(tc._filters(None, out=data), - filters): + for parsed, correct in zip_longest(tc._filters(None, out=data), + filters): self.assertEqual(parsed, correct)
def test_qdiscs(self): @@ -220,8 +220,8 @@ 'target': 5000.0, 'interval': 150000.0, 'ecn': True}}, ) - for parsed, correct in izip_longest(tc.qdiscs(None, out=data), - qdiscs): + for parsed, correct in zip_longest(tc.qdiscs(None, out=data), + qdiscs): self.assertEqual(parsed, correct)
def test_classes(self): @@ -265,8 +265,8 @@ 'leaf': '5000:', 'hfsc': {'ls': {'m1': 0, 'd': 0, 'm2': reported_ls_5000}}}, ) - for parsed, correct in izip_longest(tc.classes(None, out=data), - classes): + for parsed, correct in zip_longest(tc.classes(None, out=data), + classes): self.assertEqual(parsed, correct)
gerrit-hooks has posted comments on this change.
Change subject: py3: make network/tc_test pass ......................................................................
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'])
Dan Kenigsberg has abandoned this change.
Change subject: py3: make network/tc_test pass ......................................................................
Abandoned
this is nonsense. much more work has to be done to make these tests pass.
gerrit-hooks has posted comments on this change.
Change subject: py3: make network/tc_test pass ......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has restored this change.
Change subject: py3: make network/tc_test pass ......................................................................
Restored
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: py3: make some of network/tc_test pass ......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/63198/2/tests/network/tc_test.py File tests/network/tc_test.py:
Line 29: Line 30: from nose.plugins.attrib import attr Line 31: Line 32: import six Line 33: from six.moves import zip_longest
This is bad trend, replacing something that clearly returns an iterator to
it is only a matter of choice: whether you stick with the past naming (in py2 it's a list) or embrace the future (in py3 it is an iterator).
six opted for the latter approach, which I prefer to keep here. Line 34: Line 35: from vmfakecon import Connection Line 36: from testlib import (VdsmTestCase as TestCaseBase, permutations, Line 37: expandPermutations)
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: py3: make some of network/tc_test pass ......................................................................
Patch Set 2: Verified+1
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: py3: make some of network/tc_test pass ......................................................................
Patch Set 2: Code-Review+2
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: py3: make some of network/tc_test pass ......................................................................
py3: make some of network/tc_test pass
Non-privileged tests of this module now pass under Python 3. root-only tests still fail due to a bigger problem in our netlink package.
Change-Id: I544446358e611a0507aad7d7df4ab6c57ad5bdf0 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/network/tc/cls.py M tests/network/tc_test.py 2 files changed, 11 insertions(+), 9 deletions(-)
Approvals: Jenkins CI: Passed CI tests Dan Kenigsberg: Verified; Looks good to me, approved Edward Haas: Looks good to me, but someone else must approve
vdsm-patches@lists.fedorahosted.org