From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has uploaded a new change for review.
Change subject: net test: use static bonding defaults if dump fails ......................................................................
net test: use static bonding defaults if dump fails
sysfs_options_mapper.dump_bonding_options may fail during the test if its target directory is missing. In such a case, take the shipped defaults.
Change-Id: I33a6ecc14f6d1a2f7cc9da9bfaff4fad13fa8055 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M tests/network/nettestlib.py 1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/79889/1
diff --git a/tests/network/nettestlib.py b/tests/network/nettestlib.py index 7395755..79f55f4 100644 --- a/tests/network/nettestlib.py +++ b/tests/network/nettestlib.py @@ -532,13 +532,18 @@ bonding_name2num_fpath = ALTERNATIVE_BONDING_NAME2NUMERIC_PATH
if _has_sysfs_bond_permission(): - sysfs_options_mapper.dump_bonding_options() + try: + sysfs_options_mapper.dump_bonding_options() + except SystemError as e: + if e.errno != errno.ENOENT: + raise
if os.path.exists(BONDING_DEFAULTS): bonding_defaults_fpath = BONDING_DEFAULTS
if os.path.exists(sysfs_options_mapper.BONDING_NAME2NUMERIC_PATH): - bonding_name2num_fpath = sysfs_options_mapper.BONDING_NAME2NUMERIC_PATH + bonding_name2num_fpath = \ + sysfs_options_mapper.BONDING_NAME2NUMERIC_PATH
return bonding_defaults_fpath, bonding_name2num_fpath
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: net test: use static bonding defaults if dump fails ......................................................................
Patch Set 2: Verified+1
OST http://jenkins.ovirt.org/view/oVirt%20system%20tests/job/ovirt-system-tests_... is happy
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: net test: use static bonding defaults if dump fails ......................................................................
Patch Set 2:
(2 comments)
https://gerrit.ovirt.org/#/c/79889/2/tests/network/nettestlib.py File tests/network/nettestlib.py:
PS2, Line 537: EnvironmentError
But we saw IOError, why use this generic one?.
I don't want to bother differentiating between the two, when all I want to check is the POSIX errno of ENOENT.
That's the future, anyway: https://www.python.org/dev/peps/pep-3151/#id16
PS2, Line 545: \
Why is this needed? It worked before...
Done
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: net test: use static bonding defaults if dump fails ......................................................................
Patch Set 3: Verified+1
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/79889 )
Change subject: net test: use static bonding defaults if dump fails ......................................................................
net test: use static bonding defaults if dump fails
sysfs_options_mapper.dump_bonding_options may fail during the test if its target directory is missing. In such a case, take the shipped defaults.
Change-Id: I33a6ecc14f6d1a2f7cc9da9bfaff4fad13fa8055 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M tests/network/nettestlib.py 1 file changed, 5 insertions(+), 1 deletion(-)
Approvals: Jenkins CI: Passed CI tests Dan Kenigsberg: Verified Edward Haas: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org