linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4 v2] fstests: fix btrfs test failures after commit 27d077ec0bda
@ 2015-12-23  4:43 fdmanana
  2015-12-23  4:43 ` [PATCH 2/4 v2] fstests: cleanup test btrfs/029 fdmanana
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fdmanana @ 2015-12-23  4:43 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, Filipe Manana

From: Filipe Manana <fdmanana@suse.com>

Commit 27d077ec0bda (common: use mount/umount helpers everywhere) made
a few btrfs test fail for 2 different reasons:

1) Some tests (btrfs/029 and btrfs/031) use $SCRATCH_MNT as a mount
   point for some subvolume created in $TEST_DEV, therefore calling
   _scratch_unmount does not work as it passes $SCRATCH_DEV as the
   argument to the umount program. This is intentional to test reflinks
   accross different mountpoints of the same filesystem but for different
   subvolumes;

2) For multiple devices filesystems (btrfs/003 and btrfs/011) that test
   the device replace feature, we need to unmount using the mount path
   ($SCRATCH_MNT) because unmounting using one of the devices as an
   argument ($SCRATCH_DEV) does not always work - after replace operations
   we get in /proc/mounts a device other than $SCRATCH_DEV associated
   with the mount point $SCRATCH_MNT (this is mentioned in a comment at
   btrfs/011 for example), so we need to pass that other device to the
   umount program or pass it the mount point.

Using $SCRATCH_MNT as a mountpoint for a device other than $SCRATCH_DEV is
misleading, but that's a different problem that existed long before and
this change attempts only to fix the regression from 27d077ec0bda, leaving
such cleanups to later.
Fix this by making _sctatch_unmmount() pass $SCRATCH_MNT to umount instead
of $SCRATCH_DEV.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---

V2: Change _sctatch_unmount() to pass $SCRATCH_MNT as the argument to the
    umount program instead of $SCRATCH_DEV. This makes the btrfs tests
    pass again.

 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index d33e3fb..16a47fe 100644
--- a/common/rc
+++ b/common/rc
@@ -319,7 +319,7 @@ _scratch_unmount()
 	if [ "$FSTYP" == "overlay" ]; then
 		_overlay_scratch_unmount
 	else
-		$UMOUNT_PROG $SCRATCH_DEV
+		$UMOUNT_PROG $SCRATCH_MNT
 	fi
 }
 
-- 
2.1.3


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

end of thread, other threads:[~2016-01-11  3:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23  4:43 [PATCH 1/4 v2] fstests: fix btrfs test failures after commit 27d077ec0bda fdmanana
2015-12-23  4:43 ` [PATCH 2/4 v2] fstests: cleanup test btrfs/029 fdmanana
2015-12-23  4:43 ` [PATCH 3/4 v2] fstests: cleanup test btrfs/031 fdmanana
2015-12-23  4:43 ` [PATCH 4/4 v2] fstests: fix cleanup of test btrfs/003 fdmanana
2016-01-11  3:41 ` [PATCH 1/4 v2] fstests: fix btrfs test failures after commit 27d077ec0bda Dave Chinner

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).