From 7edea205d8768a7f35f25320b9f2d491b36e32bb Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 28 Nov 2018 16:57:57 -0500 Subject: [PATCH] selftests/functional/test_lv_utils.py: use linux_modules to skip test Signed-off-by: Cleber Rosa --- selftests/functional/test_lv_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selftests/functional/test_lv_utils.py b/selftests/functional/test_lv_utils.py index bec476cd..9e95cabb 100644 --- a/selftests/functional/test_lv_utils.py +++ b/selftests/functional/test_lv_utils.py @@ -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): """ -- GitLab