btrfs-progs: tests/common: Display warning only after searching for btrfs kernel module

Signed-off-by: Lakshmipathi.G <lakshmipathi.g@giis.co.in>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Lakshmipathi.G 2017-10-27 11:30:24 +05:30 committed by David Sterba
parent a6e5cdef43
commit 7a060ea026
1 changed files with 6 additions and 2 deletions

View 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
}