Change in vdsm[master]: net tests: Skip dump_bonding_name2numeric on EBUSY
edwardh at redhat.com
edwardh at redhat.com
Wed Jan 6 11:19:55 UTC 2016
Edward Haas has uploaded a new change for review.
Change subject: net tests: Skip dump_bonding_name2numeric on EBUSY
......................................................................
net tests: Skip dump_bonding_name2numeric on EBUSY
The test fails rarely when scanning the bond options, on EBUSY errno.
It seems to be a bond module issue that is seen on CI.
If an EBUSY error appears, the test is skipped and kernel version
is reported.
Change-Id: Ifecaacf7f0df6e490bafc7908c4519ca9a12b450
Signed-off-by: Edward Haas <edwardh at redhat.com>
---
M tests/toolBondingTests.py
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/51412/1
diff --git a/tests/toolBondingTests.py b/tests/toolBondingTests.py
index 497b934..1a6e4e1 100644
--- a/tests/toolBondingTests.py
+++ b/tests/toolBondingTests.py
@@ -18,11 +18,14 @@
#
+import errno
from vdsm.tool.dump_bonding_opts \
import _get_bonding_options_name2numeric
+from os import uname
from testlib import VdsmTestCase as TestCaseBase
from testValidation import ValidateRunningAsRoot
from modprobe import RequireBondingMod
+from nose.plugins.skip import SkipTest
class TestToolBonding(TestCaseBase):
@@ -34,7 +37,13 @@
VAL_NAME = 'none'
VAL_NUMERIC = '0'
- opt_map = _get_bonding_options_name2numeric()
+ try:
+ opt_map = _get_bonding_options_name2numeric()
+ except IOError as e:
+ if e.errno == errno.EBUSY:
+ raise SkipTest('Bond option mapping failed on EBUSY, '
+ 'Kernel version: %s' % uname()[2])
+
self.assertIn(BOND_MODE, opt_map)
self.assertIn(OPT_NAME, opt_map[BOND_MODE])
self.assertIn(VAL_NAME, opt_map[BOND_MODE][OPT_NAME])
--
To view, visit https://gerrit.ovirt.org/51412
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifecaacf7f0df6e490bafc7908c4519ca9a12b450
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh at redhat.com>
More information about the vdsm-patches
mailing list