Skip to contentSkip to conversation

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

PATCH Applied Lakshmipathi.G 2 participants 2 messages Oct 27, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

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

---
 tests/common | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tests/common +6 -2
index eb525a4..773b1e5 100644
@@ -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 listed in \
+				 /proc/filesystems, some tests might fail"
+				return 1
+			fi
 	fi
 	return 0
 }
Signature · 1 line
2.7.4