• C
    selftests/functional/test_lv_utils.py: split test_disk_space into own class · 952ecd24
    Cleber Rosa 提交于
    Given that the setUp() phase is not useful for test_disk_space, and the
    custom cleanup done in the test is better had at the tearDown() phase.
    
    Additionally, the following changes where made to make it more reliable:
    
     * Avoid the busy loop giving modprobe some time between attempts
     * Use "modprobe -r" instead of rmmod, which handlers module dependencies
     * Do an explicit check for status
     * If "modprobe -r" doesn't succeed, it's not a test failure, but a test
       a test error (given that the get_diskspace() function already ran
       and succeeded).
    
    Ideally, the module removal would be done by the linux_modules.unload_module()
    but there are some issues with that function that needs addressing first
    (such as returning a meaningful result).
    Signed-off-by: NCleber Rosa <crosa@redhat.com>
    952ecd24
test_lv_utils.py 5.8 KB