[PATCH] fstests: btrfs/161: extend the test case to delete seed

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



This test case btrfs/161 does the sprout tests, so after sprout
this patch deletes the seed to verify.

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
 tests/btrfs/161     | 16 ++++++++++++++--
 tests/btrfs/161.out |  4 ++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/tests/btrfs/161 b/tests/btrfs/161
index dfff8b871fa3..feaa7a4de6c2 100755
--- a/tests/btrfs/161
+++ b/tests/btrfs/161
@@ -5,9 +5,13 @@
 # FS QA Test 161
 #
 # seed sprout functionality test
-#  Create a seed device, mount it and, add a new device to create a
-#  sprout filesystem.
+#  Create seed
+#  Create sprout
+#  Delete seed
 #
+# The null kobject free warning is address by the kernel patch
+#   btrfs: initialize sysfs devid and device link for seed device
+
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
@@ -64,11 +68,19 @@ create_sprout()
 	run_check _mount $dev_sprout $SCRATCH_MNT
 	echo -- sprout --
 	od -x $SCRATCH_MNT/foobar
+}
+
+delete_seed()
+{
+	$BTRFS_UTIL_PROG device delete $dev_seed $SCRATCH_MNT
+	echo -- seed removed --
+	od -x $SCRATCH_MNT/foobar
 	_scratch_unmount
 }
 
 create_seed
 create_sprout
+delete_seed
 
 _scratch_dev_pool_put
 
diff --git a/tests/btrfs/161.out b/tests/btrfs/161.out
index 363b8217f45c..0fe9c128dcde 100644
--- a/tests/btrfs/161.out
+++ b/tests/btrfs/161.out
@@ -7,3 +7,7 @@ QA output created by 161
 0000000 abab abab abab abab abab abab abab abab
 *
 1000000
+-- seed removed --
+0000000 abab abab abab abab abab abab abab abab
+*
+1000000
-- 
2.25.1




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux