Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs/163: Fix recently broken test
@ 2020-09-24 12:19 Nikolay Borisov
  2020-09-24 12:35 ` Anand Jain
  0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Borisov @ 2020-09-24 12:19 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

Upstream commit "btrfs: fix replace of seed device" broke btrfs/163 as
it disallowed replacing the seed device. Update the test to account for
this change in behavior.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---

That commit still hasn't landed into upstream master but it's in misc-next hence
I discovered the failures. I guess this is really a heads up and will have to be
resubmitted when the commit is sent for upstream inclusion.

 tests/btrfs/163     | 13 +++++--------
 tests/btrfs/163.out |  4 ----
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/tests/btrfs/163 b/tests/btrfs/163
index 24c725afb6b9..7140c1874165 100755
--- a/tests/btrfs/163
+++ b/tests/btrfs/163
@@ -4,7 +4,7 @@
 #
 # FS QA Test 163
 #
-# Test case to verify that a seed device can be replaced
+# Test case to verify that a seed device cannot be replaced
 #  Create a seed device
 #  Create a sprout device
 #  Remount RW
@@ -68,14 +68,11 @@ add_sprout()

 replace_seed()
 {
-	_run_btrfs_util_prog replace start -fB $dev_seed $dev_replace_tgt $SCRATCH_MNT
-	_run_btrfs_util_prog filesystem show -m $SCRATCH_MNT
-	_scratch_unmount
-	run_check _mount $dev_replace_tgt $SCRATCH_MNT
-	echo -- sprout --
-	od -x $SCRATCH_MNT/foobar
+	$BTRFS_UTIL_PROG replace start -fB $dev_seed $dev_replace_tgt $SCRATCH_MNT &> /dev/null
+	if [ $? -ne 1 ]; then
+		_fail "replace should have failed"
+	fi
 	_scratch_unmount
-
 }

 seed_is_mountable()
diff --git a/tests/btrfs/163.out b/tests/btrfs/163.out
index 91f6f5b6f48a..7890612fc630 100644
--- a/tests/btrfs/163.out
+++ b/tests/btrfs/163.out
@@ -3,7 +3,3 @@ QA output created by 163
 0000000 abab abab abab abab abab abab abab abab
 *
 20000000
--- sprout --
-0000000 abab abab abab abab abab abab abab abab
-*
-20000000
--
2.17.1


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

* Re: [PATCH] btrfs/163: Fix recently broken test
  2020-09-24 12:19 [PATCH] btrfs/163: Fix recently broken test Nikolay Borisov
@ 2020-09-24 12:35 ` Anand Jain
  0 siblings, 0 replies; 2+ messages in thread
From: Anand Jain @ 2020-09-24 12:35 UTC (permalink / raw)
  To: Nikolay Borisov, linux-btrfs, johannes.thumshirn

On 24/9/20 8:19 pm, Nikolay Borisov wrote:
> Upstream commit "btrfs: fix replace of seed device" broke btrfs/163 as
> it disallowed replacing the seed device. Update the test to account for
> this change in behavior.
> 

  Related fix has already been submitted here
     https://patchwork.kernel.org/patch/11758651/
  I think Johannes already picked this.



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

end of thread, other threads:[~2020-09-24 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-24 12:19 [PATCH] btrfs/163: Fix recently broken test Nikolay Borisov
2020-09-24 12:35 ` Anand Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox