Skip to contentSkip to conversation

btrfs-progs: Use '-t btrfs' mount option in tests.

PATCH Applied Adam Buchbinder 3 participants 5 messages Jul 12, 2017 – Jul 21, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: Use '-t btrfs' mount option in tests.

Without it, mount (at least from util-linux 2.20.1) tries (and fails) to mount some filesystems as NTFS.

---
 tests/common                                 | 2 +-
 tests/fsck-tests/012-leaf-corruption/test.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/common +1 -1
index 7ad436e..bed6009 100644
@@ -387,7 +387,7 @@ run_check_mount_test_dev()
 		_fail "Invalid \$TEST_MNT: $TEST_MNT"
 	}
 
-	run_check $SUDO_HELPER mount $loop_opt "$@" "$TEST_DEV" "$TEST_MNT"
+	run_check $SUDO_HELPER mount -t btrfs $loop_opt "$@" "$TEST_DEV" "$TEST_MNT"
 }
 
 run_check_umount_test_dev()
tests/fsck-tests/012-leaf-corruption/test.sh +1 -1
index 43b0e6d..fc10a4f 100755
@@ -90,7 +90,7 @@ check_inode()
 check_leaf_corrupt_no_data_ext()
 {
 	image=$1
-	$SUDO_HELPER mount -o loop "$image" -o ro "$TEST_MNT"
+	$SUDO_HELPER mount -o loop -t btrfs "$image" -o ro "$TEST_MNT"
 
 	i=0
 	while [ $i -lt ${#leaf_no_data_ext_list[@]} ]; do
Signature · 1 line
2.13.2.932.g7449e964c-goog
#2 lore raw
Quoted 7 lines · David Sterba
Quoted 4 lines · Adam Buchbinder

Without it, mount (at least from util-linux 2.20.1) tries (and fails) to mount some filesystems as NTFS.

Applied, thanks.

This patch will break convert self test.

Convert test will try to mount ext* filesystem and re-check its content.

So I'm afraid it's not suitable for test cases.

Thanks,
Qu

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 7 lines · Qu Wenruo
Quoted 4 lines · David Sterba
Quoted 3 lines · Adam Buchbinder

Without it, mount (at least from util-linux 2.20.1) tries (and fails) to mount some filesystems as NTFS.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Applied, thanks.

This patch will break convert self test.

Convert test will try to mount ext* filesystem and re-check its content.

Right. I'd like to keep -t btrfs everywhere it applies, so I'll add another helper that will be used in the convert tests and seems the convert test helpers will need to be enhanced with extra parameter of the converted fs. Which is sounds like a good idea anyway.

#4 lore raw
Quoted 12 lines · David Sterba
Quoted 11 lines · Qu Wenruo
Quoted 7 lines · David Sterba
Quoted 4 lines · Adam Buchbinder

Without it, mount (at least from util-linux 2.20.1) tries (and fails) to mount some filesystems as NTFS.

Applied, thanks.

Quoted 8 lines
Quoted 3 lines

This patch will break convert self test.

Convert test will try to mount ext* filesystem and re-check its content.

Right. I'd like to keep -t btrfs everywhere it applies, so I'll add another helper that will be used in the convert tests and seems the convert test helpers will need to be enhanced with extra parameter of the converted fs. Which is sounds like a good idea anyway.

With

https://github.com/kdave/btrfs-progs/commit/18b519e694a6ef559d85072f86898ab5a61f6a05

https://github.com/kdave/btrfs-progs/commit/46809a7287eb41ff2fdb83f742bd5250b820145a

the testsuite now passes.