Skip to contentSkip to conversation

xfs: basic functional testing of media verification command

PATCH In review Darrick J. Wong 2 participants 3 messages Aug 26 – Sep 2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: basic functional testing of media verification command

From: Darrick J. Wong <[email protected]>

Implement a simple testcase to check that media verification works on however the scratch filesystem is configured.

---
 common/xfs         |    3 +
 tests/xfs/1908     |  122 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1908.out |   28 ++++++++++++
 3 files changed, 153 insertions(+)
 create mode 100755 tests/xfs/1908
 create mode 100644 tests/xfs/1908.out
common/xfs +3 -0
index 81add2086866c8..8dec3475579e40 100644
@@ -1786,6 +1786,9 @@ _xfs_filter_mkfs()
 	}
 	if (/^\s+=\s+rgcount=(\d+)\s+rgsize=(\d+) extents/) {
 		print STDERR "rgcount=$1\nrgextents=$2\n";
+	}
+	if (/^\s+=\s+zoned=(\d+)\s+start=(\d+) reserved=(\d+)/) {
+		print STDERR "zoned=$1\nrtstart=$2\nrtreserved=$3\n";
 	}'
 }
 
tests/xfs/1908 new file +122 -0

122 lines not on this page · raw message

tests/xfs/1908.out new file +28 -0
new file mode 100644
index 00000000000000..bbc55ef31a13a0
@@ -0,0 +1,28 @@
+QA output created by 1908
+t0 wanted range is in range
+t0 verified range is in range
+t0 offset is in range
+t1 wanted range is in range
+t1 verified range is in range
+t1 offset is in range
+t2 wanted range is in range
+t2 verified range is in range
+t2 offset is in range
+t3 wanted range is in range
+t3 verified range is in range
+t3 offset is in range
+t4 wanted range is in range
+t4 verified range is in range
+t4 offset is in range
+t5 wanted range is in range
+t5 verified range is in range
+t5 offset is in range
+t6 wanted range is in range
+t6 verified range is in range
+t6 offset is in range
+t7 wanted range is in range
+t7 verified range is in range
+t7 offset is in range
+t8 wanted range is in range
+t8 verified range is in range
+t8 offset is in range
#1 lore raw

common/xfs _xfs_filter_mkfs() · line 1792

Quoted 12 lines
common/xfs +3 -0
index 81add2086866c8..8dec3475579e40 100644
@@ -1786,6 +1786,9 @@ _xfs_filter_mkfs()
 	}
 	if (/^\s+=\s+rgcount=(\d+)\s+rgsize=(\d+) extents/) {
 		print STDERR "rgcount=$1\nrgextents=$2\n";
+	}
+	if (/^\s+=\s+zoned=(\d+)\s+start=(\d+) reserved=(\d+)/) {
+		print STDERR "zoned=$1\nrtstart=$2\nrtreserved=$3\n";
 	}'

How is this related? Maybe split it out into a well-doumented patch?

Also does the ' after the } break the usage?

common/xfs _xfs_filter_mkfs()

Quoted 4 lines
common/xfs +4 -0
+
+# Make the data and rt volumes small enough that this won't take forever
+# on large slow devices.
+_scratch_mkfs_sized $((600 * 1024 * 1024)) | _filter_mkfs 2>$tmp.mkfs >> $seqres.full

Split the overly long line?

Otherwise this looks good to me.

#2 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 6 lines
common/xfs +0 -0
index 81add2086866c8..8dec3475579e40 100644
@@ -1786,6 +1786,9 @@ _xfs_filter_mkfs()
 	}
Quoted 8 lines

common/xfs _xfs_filter_mkfs() · line 1792

Quoted 6 lines
common/xfs +3 -0
 	if (/^\s+=\s+rgcount=(\d+)\s+rgsize=(\d+) extents/) {
 		print STDERR "rgcount=$1\nrgextents=$2\n";
+	}
+	if (/^\s+=\s+zoned=(\d+)\s+start=(\d+) reserved=(\d+)/) {
+		print STDERR "zoned=$1\nrtstart=$2\nrtreserved=$3\n";
 	}'

How is this related? Maybe split it out into a well-doumented patch?

The test sources $tmp.mkfs and reads the rtstart= variable that is created by the addition to _xfs_filter_mkfs. I'll split this into its own patch with a separate justification.

Quoted 1 line

Also does the ' after the } break the usage?

No, because it's an awk script embedded in a bash string argument.

Quoted 6 lines

common/xfs _xfs_filter_mkfs()

Quoted 4 lines
common/xfs +4 -0
+
+# Make the data and rt volumes small enough that this won't take forever
+# on large slow devices.
+_scratch_mkfs_sized $((600 * 1024 * 1024)) | _filter_mkfs 2>$tmp.mkfs >> $seqres.full

Split the overly long line?

Ok.

Quoted 1 line

Otherwise this looks good to me.

Thanks!

--D