Skip to contentSkip to conversation

xfstests: make btrfs/001.out in line with subvol delete output

PATCH Superseded Anand Jain 3 participants 8 messages Jan 13, 2014 – Jan 16, 2014 Btrfs file system

lore
Share & tools
lore

Anand Jain

author
#0 lore raw

PATCH 1/2 xfstests: make btrfs/001.out in line with subvol delete output

From: Anand Jain <[email protected]>

btrfs/001 is failing as below btrfs-progs patch changed the output during subvol delete.
Patch :
btrfs-progs: add options to set commit mode after subvol delete

so add it to the btrfs/001.out

---
 tests/btrfs/001.out | 1 +
 1 file changed, 1 insertion(+)
tests/btrfs/001.out +1 -0
index c782bde..a255614 100644
@@ -33,6 +33,7 @@ subvol
 Listing subvolumes
 snap
 subvol
+Transaction commit: none (default)
 Delete subvolume 'SCRATCH_MNT/snap'
 List root dir
 subvol
Signature · 1 line
1.8.4.2
author
#1 lore raw

PATCH 2/2 xfstest: tests btrfs/006 fails with mixed-mode/small disks

From: Anand Jain <[email protected]>

as of now the script does not filter 0.00 size in the filesystem show output, which is the case in multi-disk mixed-mode (that is default group type for small disks)

---
 common/filter       | 6 ++++++
 common/filter.btrfs | 1 +
 2 files changed, 7 insertions(+)
common/filter +6 -0
index c872a27..04d12c4 100644
@@ -277,6 +277,12 @@ _filter_uuid()
 	fi
 }
 
+# In mixed group the added disks may have zero used size
+_filter_zero_size()
+{
+	sed -e "s/0\.00/<SIZE>/g"
+}
+
 # Filter out sizes like 6.14MB etc
 _filter_size()
 {
common/filter.btrfs +1 -0
index 29512cd..75853f2 100644
@@ -33,6 +33,7 @@ _filter_btrfs_filesystem_show()
 	# the uniq collapses all device lines into 1
 	_filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \
 	_filter_size | _filter_btrfs_version | _filter_devid | \
+	_filter_zero_size | \
 	sed -e "s/\(Total devices\) $NUMDEVS/\1 $NUM_SUBST/g" | \
 	uniq
 }
Signature · 1 line
1.8.4.2
#2 lore raw
In reply to Anand Jain

Hello Anand,

I was noticing this problem when using the latest btrfs-progs to test ^_^

I think a better way is to filter message 'Transaction commit: none (default)' Rather than add it, otherwise, people will fail this test if they use previous btrfs-progs……

Thanks,
Wang

Quoted 33 lines

From: Anand Jain <[email protected]>

btrfs/001 is failing as below btrfs-progs patch changed the output during subvol delete.
Patch :
btrfs-progs: add options to set commit mode after subvol delete

so add it to the btrfs/001.out

---
tests/btrfs/001.out | 1 +

1 file changed, 1 insertion(+)
tests/btrfs/001.out +0 -0
index c782bde..a255614 100644
@@ -33,6 +33,7 @@ subvol

Listing subvolumes
snap
subvol
+Transaction commit: none (default)
Delete subvolume 'SCRATCH_MNT/snap'
List root dir
subvol

Signature · 6 lines
1.8.4.2

--
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
author
#3 lore raw

Hi Wang,

Ah yes. why did I miss that point earlier.
Will fix it.

Thanks, Anand

Quoted 49 lines · Wang Shilong

Hello Anand,

I was noticing this problem when using the latest btrfs-progs to test ^_^

I think a better way is to filter message 'Transaction commit: none (default)' Rather than add it, otherwise, people will fail this test if they use previous btrfs-progs……

Thanks,
Wang

Quoted 19 lines

From: Anand Jain <[email protected]>

btrfs/001 is failing as below btrfs-progs patch changed the output during subvol delete.
Patch :
btrfs-progs: add options to set commit mode after subvol delete

so add it to the btrfs/001.out

---
tests/btrfs/001.out | 1 +

1 file changed, 1 insertion(+)
tests/btrfs/001.out +0 -0
index c782bde..a255614 100644
@@ -33,6 +33,7 @@ subvol
Quoted 14 lines

Listing subvolumes
snap
subvol
+Transaction commit: none (default)
Delete subvolume 'SCRATCH_MNT/snap'
List root dir
subvol

Signature · 6 lines
1.8.4.2

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

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

author
#4 lore raw

PATCH v2 1/2 xfstests: make btrfs/001.out in line with subvol delete output

In reply to Anand Jain

From: Anand Jain <[email protected]>

btrfs/001 is failing as the below btrfs-progs patch changed the output during subvol delete.
Patch :
btrfs-progs: add options to set commit mode after subvol delete

adding it to the filter

---
v2: accepts Wang suggested

 common/filter       |    4 ++++
 common/filter.btrfs |    6 ++++++
 tests/btrfs/001     |    3 ++-
 3 files changed, 12 insertions(+), 1 deletions(-)
common/filter +4 -0
index c872a27..3842c1b 100644
@@ -313,5 +313,9 @@ _filter_ro_mount() {
 	    -e "s/mount: cannot mount block device/mount: cannot mount/g"
 }
 
+_filter_transcation_commit_default() {
+	sed -e "/Transaction commit: none (default)/d"
+}
+
 # make sure this script returns success
 /bin/true
common/filter.btrfs +6 -0
index 29512cd..563dff4 100644
@@ -56,5 +56,11 @@ _filter_btrfs_device_stats()
 	sed -e "s/ *$NUMDEVS /<NUMDEVS> /g"
 }
 
+_filter_btrfs_subvol_delete()
+{
+	_filter_scratch | _filter_transcation_commit_default
+
+}
+
 # make sure this script returns success
 /bin/true
tests/btrfs/001 +2 -1
index c05d772..8258d06 100755
@@ -40,6 +40,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 # get standard environment, filters and checks
 . ./common/rc
 . ./common/filter
+. ./common/filter.btrfs
 
 # real QA test starts here
 _supported_fs btrfs
@@ -98,7 +99,7 @@ echo "Listing subvolumes"
 $BTRFS_UTIL_PROG subvolume list $SCRATCH_MNT | awk '{ print $NF }'
 
 # Delete the snapshot
-$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_scratch
+$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_btrfs_subvol_delete
 echo "List root dir"
 ls $SCRATCH_MNT
 _scratch_remount
Signature · 1 line
1.7.1
#5 lore raw

common/filter _filter_ro_mount() { · line 318

Quoted 9 lines · Anand Jain
common/filter +3 -0
@@ -313,5 +313,9 @@ _filter_ro_mount() {
 	    -e "s/mount: cannot mount block device/mount: cannot mount/g"
 }
 
+_filter_transcation_commit_default() {
+	sed -e "/Transaction commit: none (default)/d"
+}

This IMO belongs to filters.btrfs

Quoted 3 lines
common/filter +1 -0
+
 # make sure this script returns success
 /bin/true
author
#6 lore raw

PATCH v3 1/2 xfstests: make btrfs/001.out in line with subvol delete output

In reply to Anand Jain

From: Anand Jain <[email protected]>

btrfs/001 is failing as the below btrfs-progs patch changed the output during subvol delete.
Patch :
btrfs-progs: add options to set commit mode after subvol delete

adding it to the filter

---
v3: takes in David suggested
v2: accepts Wang suggested

 common/filter.btrfs |   10 ++++++++++
 tests/btrfs/001     |    3 ++-
 2 files changed, 12 insertions(+), 1 deletions(-)
common/filter.btrfs +10 -0
index 29512cd..b81ac49 100644
@@ -56,5 +56,15 @@ _filter_btrfs_device_stats()
 	sed -e "s/ *$NUMDEVS /<NUMDEVS> /g"
 }
 
+_filter_transcation_commit_default() {
+	sed -e "/Transaction commit: none (default)/d"
+}
+
+_filter_btrfs_subvol_delete()
+{
+	_filter_scratch | _filter_transcation_commit_default
+
+}
+
 # make sure this script returns success
 /bin/true
tests/btrfs/001 +2 -1
index c05d772..8258d06 100755
@@ -40,6 +40,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 # get standard environment, filters and checks
 . ./common/rc
 . ./common/filter
+. ./common/filter.btrfs
 
 # real QA test starts here
 _supported_fs btrfs
@@ -98,7 +99,7 @@ echo "Listing subvolumes"
 $BTRFS_UTIL_PROG subvolume list $SCRATCH_MNT | awk '{ print $NF }'
 
 # Delete the snapshot
-$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_scratch
+$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_btrfs_subvol_delete
 echo "List root dir"
 ls $SCRATCH_MNT
 _scratch_remount
Signature · 6 lines
1.7.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
author
#7 lore raw

PATCH v3 1/2 xfstests: make btrfs/001.out in line with subvol delete output

In reply to Anand Jain

From: Anand Jain <[email protected]>

btrfs/001 is failing as the below btrfs-progs patch changed the output during subvol delete.
Patch :
btrfs-progs: add options to set commit mode after subvol delete

adding it to the filter

---
v3: takes in David suggested
v2: accepts Wang suggested

 common/filter.btrfs |   10 ++++++++++
 tests/btrfs/001     |    3 ++-
 2 files changed, 12 insertions(+), 1 deletions(-)
common/filter.btrfs +10 -0
index 29512cd..b81ac49 100644
@@ -56,5 +56,15 @@ _filter_btrfs_device_stats()
 	sed -e "s/ *$NUMDEVS /<NUMDEVS> /g"
 }
 
+_filter_transcation_commit_default() {
+	sed -e "/Transaction commit: none (default)/d"
+}
+
+_filter_btrfs_subvol_delete()
+{
+	_filter_scratch | _filter_transcation_commit_default
+
+}
+
 # make sure this script returns success
 /bin/true
tests/btrfs/001 +2 -1
index c05d772..8258d06 100755
@@ -40,6 +40,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 # get standard environment, filters and checks
 . ./common/rc
 . ./common/filter
+. ./common/filter.btrfs
 
 # real QA test starts here
 _supported_fs btrfs
@@ -98,7 +99,7 @@ echo "Listing subvolumes"
 $BTRFS_UTIL_PROG subvolume list $SCRATCH_MNT | awk '{ print $NF }'
 
 # Delete the snapshot
-$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_scratch
+$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_btrfs_subvol_delete
 echo "List root dir"
 ls $SCRATCH_MNT
 _scratch_remount
Signature · 6 lines
1.7.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs