linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: Use '-t btrfs' mount option in tests.
@ 2017-07-12 20:05 Adam Buchbinder
  2017-07-12 21:52 ` David Sterba
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Buchbinder @ 2017-07-12 20:05 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Adam Buchbinder

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

Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
---
 tests/common                                 | 2 +-
 tests/fsck-tests/012-leaf-corruption/test.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/common b/tests/common
index 7ad436e..bed6009 100644
--- a/tests/common
+++ b/tests/common
@@ -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()
diff --git a/tests/fsck-tests/012-leaf-corruption/test.sh b/tests/fsck-tests/012-leaf-corruption/test.sh
index 43b0e6d..fc10a4f 100755
--- a/tests/fsck-tests/012-leaf-corruption/test.sh
+++ b/tests/fsck-tests/012-leaf-corruption/test.sh
@@ -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
-- 
2.13.2.932.g7449e964c-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] btrfs-progs: Use '-t btrfs' mount option in tests.
  2017-07-12 20:05 [PATCH] btrfs-progs: Use '-t btrfs' mount option in tests Adam Buchbinder
@ 2017-07-12 21:52 ` David Sterba
  2017-07-20  9:40   ` Qu Wenruo
  0 siblings, 1 reply; 5+ messages in thread
From: David Sterba @ 2017-07-12 21:52 UTC (permalink / raw)
  To: Adam Buchbinder; +Cc: linux-btrfs

On Wed, Jul 12, 2017 at 01:05:22PM -0700, Adam Buchbinder wrote:
> Without it, mount (at least from util-linux 2.20.1) tries (and
> fails) to mount some filesystems as NTFS.
> 
> Signed-off-by: Adam Buchbinder <abuchbinder@google.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] btrfs-progs: Use '-t btrfs' mount option in tests.
  2017-07-12 21:52 ` David Sterba
@ 2017-07-20  9:40   ` Qu Wenruo
  2017-07-20 15:42     ` David Sterba
  0 siblings, 1 reply; 5+ messages in thread
From: Qu Wenruo @ 2017-07-20  9:40 UTC (permalink / raw)
  To: dsterba, Adam Buchbinder, linux-btrfs



On 2017年07月13日 05:52, David Sterba wrote:
> On Wed, Jul 12, 2017 at 01:05:22PM -0700, Adam Buchbinder wrote:
>> Without it, mount (at least from util-linux 2.20.1) tries (and
>> fails) to mount some filesystems as NTFS.
>>
>> Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
> 
> 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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] btrfs-progs: Use '-t btrfs' mount option in tests.
  2017-07-20  9:40   ` Qu Wenruo
@ 2017-07-20 15:42     ` David Sterba
  2017-07-21 12:36       ` David Sterba
  0 siblings, 1 reply; 5+ messages in thread
From: David Sterba @ 2017-07-20 15:42 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Adam Buchbinder, linux-btrfs

On Thu, Jul 20, 2017 at 05:40:00PM +0800, Qu Wenruo wrote:
> 
> 
> On 2017年07月13日 05:52, David Sterba wrote:
> > On Wed, Jul 12, 2017 at 01:05:22PM -0700, Adam Buchbinder wrote:
> >> Without it, mount (at least from util-linux 2.20.1) tries (and
> >> fails) to mount some filesystems as NTFS.
> >>
> >> Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
> > 
> > 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] btrfs-progs: Use '-t btrfs' mount option in tests.
  2017-07-20 15:42     ` David Sterba
@ 2017-07-21 12:36       ` David Sterba
  0 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2017-07-21 12:36 UTC (permalink / raw)
  To: Qu Wenruo, Adam Buchbinder, linux-btrfs

On Thu, Jul 20, 2017 at 05:42:46PM +0200, David Sterba wrote:
> On Thu, Jul 20, 2017 at 05:40:00PM +0800, Qu Wenruo wrote:
> > 
> > 
> > On 2017年07月13日 05:52, David Sterba wrote:
> > > On Wed, Jul 12, 2017 at 01:05:22PM -0700, Adam Buchbinder wrote:
> > >> Without it, mount (at least from util-linux 2.20.1) tries (and
> > >> fails) to mount some filesystems as NTFS.
> > >>
> > >> Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
> > > 
> > > 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.

With

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

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

the testsuite now passes.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-21 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 20:05 [PATCH] btrfs-progs: Use '-t btrfs' mount option in tests Adam Buchbinder
2017-07-12 21:52 ` David Sterba
2017-07-20  9:40   ` Qu Wenruo
2017-07-20 15:42     ` David Sterba
2017-07-21 12:36       ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).