btrfs-progs: tests/common: Display warning only after searching for btrfs kernel...
authorLakshmipathi.G <lakshmipathi.g@giis.co.in>
Fri, 27 Oct 2017 06:00:24 +0000 (11:30 +0530)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Nov 2017 14:59:00 +0000 (15:59 +0100)
Signed-off-by: Lakshmipathi.G <lakshmipathi.g@giis.co.in>
Signed-off-by: David Sterba <dsterba@suse.com>
tests/common

index eb525a4..dec090f 100644 (file)
@@ -428,8 +428,12 @@ run_check_umount_test_dev()
 check_kernel_support()
 {
        if ! grep -iq 'btrfs' /proc/filesystems; then
-               echo "WARNING: btrfs filesystem not listed in /proc/filesystems, some tests might fail"
-               return 1
+               run_check $SUDO_HELPER modprobe btrfs
+                       if ! grep -iq 'btrfs' /proc/filesystems; then
+                               echo \
+"WARNING: btrfs filesystem not found in /proc/filesystems, some tests might fail"
+                               return 1
+                       fi
        fi
        return 0
 }