提交 7edea205 编写于 作者: C Cleber Rosa

selftests/functional/test_lv_utils.py: use linux_modules to skip test

Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 e3eb7760
......@@ -15,6 +15,7 @@ from six.moves import xrange as range
from avocado.utils import process
from avocado.utils import lv_utils
from avocado.utils import linux_modules
class LVUtilsTest(unittest.TestCase):
......@@ -43,8 +44,7 @@ class LVUtilsTest(unittest.TestCase):
@unittest.skipIf(process.system("modinfo scsi_debug", shell=True,
ignore_status=True),
"Kernel mod 'scsi_debug' not available.")
@unittest.skipIf(process.system("lsmod | grep -q scsi_debug; [ $? -ne 0 ]",
shell=True, ignore_status=True),
@unittest.skipIf(linux_modules.module_is_loaded("scsi_debug"),
"Kernel mod 'scsi_debug' is already loaded.")
def test_get_diskspace(self):
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册