Skip to contentSkip to conversation

xfstests: add test for xfs_repair progress reporting

PATCH Superseded Donald Douwsma 5 participants 16 messages May 19, 2020 – Sep 2, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: add test for xfs_repair progress reporting

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
 tests/xfs/516     | 72 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 88 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +72 -0
new file mode 100755
index 00000000..5ad57fbc
@@ -0,0 +1,72 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+$XFS_REPAIR_PROG -o ag_stride=4 -t 1 $DELAY_DEV >> $seqres.full 2>&1
+cat $seqres.full | _filter_repair | sort -u
+
+_cleanup_delay
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..bc824d7f
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+	- #:#:#: Phase #: #% done - estimated remaining time # minutes, # seconds
+	- #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+	- #:#:#: Phase #: elapsed time # seconds - processed # inodes per minute
+        - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+        - #:#:#: process known inodes and inode discovery - # of # inodes done
+        - #:#:#: process newly discovered inodes - # of # allocation groups done
+        - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+        - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+        - #:#:#: scanning filesystem freespace - # of # allocation groups done
+        - #:#:#: setting up duplicate extent list - # of # allocation groups done
+        - #:#:#: verify and correct link counts - # of # allocation groups done
tests/xfs/group +1 -0
index 12eb55c9..aeeca23f 100644
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair
Signature · 1 line
2.18.4
#1 lore raw
Quoted 74 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
 tests/xfs/516     | 72 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 88 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +55 -0
new file mode 100755
index 00000000..5ad57fbc
@@ -0,0 +1,72 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"

tests/xfs/516 line 65

Quoted 10 lines
tests/xfs/516 new file +10 -0
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+$XFS_REPAIR_PROG -o ag_stride=4 -t 1 $DELAY_DEV >> $seqres.full 2>&1

Hmm... if the scratch device had an external log device, this raw invocation of repair won't run because it won't have the log parameter. Normally I'd say just use _scratch_xfs_repair here, but since there's a delay device involved, things get trickier...

...or maybe they don't?

SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride...

might work, seeing as we do that in a few places...

tests/xfs/516 line 66

Quoted 1 line
tests/xfs/516 new file +1 -0
+cat $seqres.full | _filter_repair | sort -u

You also might want to redirect the repair output to a separate file so that you can filter and sort /only/ the repair output in the process of logging the repair results to stdout and $seqres.full.

--D

Quoted 39 lines
tests/xfs/516 new file +6 -0
+
+_cleanup_delay
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..bc824d7f
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+	- #:#:#: Phase #: #% done - estimated remaining time # minutes, # seconds
+	- #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+	- #:#:#: Phase #: elapsed time # seconds - processed # inodes per minute
+        - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+        - #:#:#: process known inodes and inode discovery - # of # inodes done
+        - #:#:#: process newly discovered inodes - # of # allocation groups done
+        - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+        - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+        - #:#:#: scanning filesystem freespace - # of # allocation groups done
+        - #:#:#: setting up duplicate extent list - # of # allocation groups done
+        - #:#:#: verify and correct link counts - # of # allocation groups done
tests/xfs/group +1 -0
index 12eb55c9..aeeca23f 100644
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair
Signature · 1 line
2.18.4
#2 lore raw
Quoted 91 lines · Darrick J. Wong
Quoted 74 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
 tests/xfs/516     | 72 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 88 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +55 -0
new file mode 100755
index 00000000..5ad57fbc
@@ -0,0 +1,72 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"

tests/xfs/516 line 65

Quoted 10 lines
tests/xfs/516 new file +10 -0
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+$XFS_REPAIR_PROG -o ag_stride=4 -t 1 $DELAY_DEV >> $seqres.full 2>&1

Hmm... if the scratch device had an external log device, this raw invocation of repair won't run because it won't have the log parameter. Normally I'd say just use _scratch_xfs_repair here, but since there's a delay device involved, things get trickier...

Quoted 6 lines

...or maybe they don't?

SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride...

might work, seeing as we do that in a few places...

Thanks, that works a treat!

Quoted 5 lines

tests/xfs/516 line 66

Quoted 1 line
tests/xfs/516 new file +1 -0
+cat $seqres.full | _filter_repair | sort -u

You also might want to redirect the repair output to a separate file so that you can filter and sort /only/ the repair output in the process of logging the repair results to stdout and $seqres.full.

*nod*, that would be much clearer.

Cheers,
Don

Quoted 42 lines

--D

Quoted 39 lines
tests/xfs/516 new file +6 -0
+
+_cleanup_delay
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..bc824d7f
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+	- #:#:#: Phase #: #% done - estimated remaining time # minutes, # seconds
+	- #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+	- #:#:#: Phase #: elapsed time # seconds - processed # inodes per minute
+        - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+        - #:#:#: process known inodes and inode discovery - # of # inodes done
+        - #:#:#: process newly discovered inodes - # of # allocation groups done
+        - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+        - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+        - #:#:#: scanning filesystem freespace - # of # allocation groups done
+        - #:#:#: setting up duplicate extent list - # of # allocation groups done
+        - #:#:#: verify and correct link counts - # of # allocation groups done
tests/xfs/group +1 -0
index 12eb55c9..aeeca23f 100644
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair
Signature · 1 line
2.18.4
#3 lore raw

PATCH v2 1/1 xfstests: add test for xfs_repair progress reporting

In reply to Darrick J. Wong

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

 tests/xfs/516     | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 92 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +76 -0
new file mode 100755
index 00000000..1c0508ef
@@ -0,0 +1,76 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $seqres.xfs_repair.out
+
+cat $seqres.xfs_repair.out | _filter_repair | sort -u
+
+_cleanup_delay
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..85018b93
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +1 -0
index 12eb55c9..aeeca23f 100644
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair
Signature · 1 line
2.18.4
Reviewed-by on v2 1/1
#4 lore raw
Quoted 85 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

 tests/xfs/516     | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 92 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +60 -0
new file mode 100755
index 00000000..1c0508ef
@@ -0,0 +1,76 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay

tests/xfs/516 line 70

Quoted 10 lines
tests/xfs/516 new file +10 -0
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $seqres.xfs_repair.out
+
+cat $seqres.xfs_repair.out | _filter_repair | sort -u

I might've redirected this to $tmp.repair, but otherwise I think this looks decent.

--D

Quoted 39 lines
tests/xfs/516 new file +6 -0
+
+_cleanup_delay
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..85018b93
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +1 -0
index 12eb55c9..aeeca23f 100644
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair
Signature · 1 line
2.18.4
#5 lore raw
In reply to Donald Douwsma
Quoted 11 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

I saw failures like below, and I'm using v5.7-rc4 kernel and v5.4.0 xfsprogs, is this expected failure?

@@ -2,8 +2,6 @@
Format and populate
Introduce a dmdelay
Run repair
- - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
- - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
- #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
- #:#:#: process known inodes and inode discovery - # of # inodes done
- #:#:#: process newly discovered inodes - # of # allocation groups done
@@ -12,4 +10,3 @@
- #:#:#: scanning filesystem freespace - # of # allocation groups done
- #:#:#: setting up duplicate extent list - # of # allocation groups done
- #:#:#: verify and correct link counts - # of # allocation groups done
- - #:#:#: zeroing log - # of # blocks done

Quoted 23 lines
 tests/xfs/516     | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 92 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +9 -0
new file mode 100755
index 00000000..1c0508ef
@@ -0,0 +1,76 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`

tests/xfs/516 line 19

Quoted 10 lines
tests/xfs/516 new file +10 -0
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
	rm -f $tmp.*

As some common helpers would use $tmp. files as well.

tests/xfs/516 line 21

Quoted 2 lines
tests/xfs/516 new file +2 -0
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1

I think we could do _cleanup_delay here and discard the outputs.

Quoted 13 lines
tests/xfs/516 new file +13 -0
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+

tests/xfs/516 line 44

Quoted 10 lines
tests/xfs/516 new file +10 -0
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()

Function names with the leading underscore are reserved for common helpers, filter_repair would be fine.

Quoted 16 lines
tests/xfs/516 new file +16 -0
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay

tests/xfs/516 line 70

Quoted 10 lines
tests/xfs/516 new file +10 -0
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $seqres.xfs_repair.out
+
+cat $seqres.xfs_repair.out | _filter_repair | sort -u

I agreed with Darrick here. redirect output to $tmp.repair is better, as we already cleanup $tmp.* in _cleanup, and no one is cleaning up $seqres.xfs_repair.out file.

tests/xfs/516 line 72

Quoted 2 lines
tests/xfs/516 new file +2 -0
+
+_cleanup_delay

We could remove this one if do it in _cleanup.

Quoted 30 lines
tests/xfs/516 new file +4 -0
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..85018b93
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +0 -0
index 12eb55c9..aeeca23f 100644

tests/xfs/group line 516

Quoted 4 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Should be in auto group as well? Only tests in auto (and quick, which is a sub-set of auto) will be run by default.

Thanks,
Eryu

Quoted 2 lines
Signature · 1 line
2.18.4
#6 lore raw
Quoted 26 lines · Eryu Guan
Quoted 11 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

I saw failures like below, and I'm using v5.7-rc4 kernel and v5.4.0 xfsprogs, is this expected failure?

(quoted diff) +0 -2
@@ -2,8 +2,6 @@
 Format and populate
 Introduce a dmdelay
 Run repair
- - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
- - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
  - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
  - #:#:#: process known inodes and inode discovery - # of # inodes done
  - #:#:#: process newly discovered inodes - # of # allocation groups done

Review line 15

Quoted 4 lines
(quoted diff) +0 -1
@@ -12,4 +10,3 @@
  - #:#:#: scanning filesystem freespace - # of # allocation groups done
  - #:#:#: setting up duplicate extent list - # of # allocation groups done
  - #:#:#: verify and correct link counts - # of # allocation groups done
- - #:#:#: zeroing log - # of # blocks done

Yeah, there's an xfsprogs patch pending, IIRC.

--D

Quoted 150 lines
Quoted 24 lines

 tests/xfs/516     | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 92 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +9 -0
new file mode 100755
index 00000000..1c0508ef
@@ -0,0 +1,76 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`

tests/xfs/516 line 19

Quoted 10 lines
tests/xfs/516 new file +10 -0
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
	rm -f $tmp.*

As some common helpers would use $tmp. files as well.

tests/xfs/516 line 21

Quoted 2 lines
tests/xfs/516 new file +2 -0
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1

I think we could do _cleanup_delay here and discard the outputs.

Quoted 13 lines
tests/xfs/516 new file +13 -0
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+

tests/xfs/516 line 44

Quoted 10 lines
tests/xfs/516 new file +10 -0
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()

Function names with the leading underscore are reserved for common helpers, filter_repair would be fine.

Quoted 16 lines
tests/xfs/516 new file +16 -0
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay

tests/xfs/516 line 70

Quoted 10 lines
tests/xfs/516 new file +10 -0
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $seqres.xfs_repair.out
+
+cat $seqres.xfs_repair.out | _filter_repair | sort -u

I agreed with Darrick here. redirect output to $tmp.repair is better, as we already cleanup $tmp.* in _cleanup, and no one is cleaning up $seqres.xfs_repair.out file.

tests/xfs/516 line 72

Quoted 2 lines
tests/xfs/516 new file +2 -0
+
+_cleanup_delay

We could remove this one if do it in _cleanup.

Quoted 30 lines
tests/xfs/516 new file +4 -0
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..85018b93
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +0 -0
index 12eb55c9..aeeca23f 100644

tests/xfs/group line 516

Quoted 4 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Should be in auto group as well? Only tests in auto (and quick, which is a sub-set of auto) will be run by default.

Thanks,
Eryu

Quoted 2 lines
Signature · 1 line
2.18.4
#7 lore raw
In reply to Eryu Guan

Hi Eryu,

Thanks for the feedback. Apologies for the delay getting back to you, I hadn't noticed the rest of your questions under Darrick's reply.

Quoted 13 lines · Eryu Guan
Quoted 11 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

Quoted 2 lines

I saw failures like below, and I'm using v5.7-rc4 kernel and v5.4.0 xfsprogs, is this expected failure?

This should be passing now.

Quoted 52 lines
(quoted diff) +0 -3
@@ -2,8 +2,6 @@
 Format and populate
 Introduce a dmdelay
 Run repair
- - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
- - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
  - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
  - #:#:#: process known inodes and inode discovery - # of # inodes done
  - #:#:#: process newly discovered inodes - # of # allocation groups done
@@ -12,4 +10,3 @@
  - #:#:#: scanning filesystem freespace - # of # allocation groups done
  - #:#:#: setting up duplicate extent list - # of # allocation groups done
  - #:#:#: verify and correct link counts - # of # allocation groups done
- - #:#:#: zeroing log - # of # blocks done
Quoted 24 lines

 tests/xfs/516     | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 92 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +9 -0
new file mode 100755
index 00000000..1c0508ef
@@ -0,0 +1,76 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`

tests/xfs/516 line 19

Quoted 10 lines
tests/xfs/516 new file +10 -0
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
	rm -f $tmp.*
Quoted 7 lines

As some common helpers would use $tmp. files as well.

tests/xfs/516 line 21

Quoted 2 lines
tests/xfs/516 new file +2 -0
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1

I think we could do _cleanup_delay here and discard the outputs.

Fixed.

Quoted 18 lines
Quoted 18 lines
tests/xfs/516 new file +18 -0
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
Quoted 8 lines

tests/xfs/516 line 44

Quoted 5 lines
tests/xfs/516 new file +5 -0
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()

Function names with the leading underscore are reserved for common helpers, filter_repair would be fine.

Fixed.

Quoted 32 lines
Quoted 17 lines
tests/xfs/516 new file +16 -0
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay

tests/xfs/516 line 70

Quoted 10 lines
tests/xfs/516 new file +10 -0
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $seqres.xfs_repair.out
+
+cat $seqres.xfs_repair.out | _filter_repair | sort -u

I agreed with Darrick here. redirect output to $tmp.repair is better, as we already cleanup $tmp.* in _cleanup, and no one is cleaning up $seqres.xfs_repair.out file.

Quoted 4 lines

tests/xfs/516 line 72

Quoted 2 lines
tests/xfs/516 new file +2 -0
+
+_cleanup_delay

We could remove this one if do it in _cleanup.

Done!

Quoted 30 lines
Quoted 30 lines
tests/xfs/516 new file +4 -0
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +15 -0
new file mode 100644
index 00000000..85018b93
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +0 -0
index 12eb55c9..aeeca23f 100644
Quoted 8 lines

tests/xfs/group line 516

Quoted 5 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Should be in auto group as well? Only tests in auto (and quick, which is a sub-set of auto) will be run by default.

It doesn't seem there were any objections to adding it, so I've added it to auto, I've left it out of quick for now.

Regards,
Don

#8 lore raw

PATCH v3 1/1 xfstests: add test for xfs_repair progress reporting

In reply to Eryu Guan

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v2:
- Fix cleanup handling and function naming
- Added to auto group
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

 tests/xfs/521     | 75 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/521.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 91 insertions(+)
 create mode 100755 tests/xfs/521
 create mode 100644 tests/xfs/521.out
tests/xfs/521 new file +75 -0
new file mode 100755
index 00000000..c16c82bf
@@ -0,0 +1,75 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 521
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+	_cleanup_delay > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $tmp.repair
+
+cat $tmp.repair | filter_repair | sort -u
+
+# success, all done
+status=0
+exit
tests/xfs/521.out new file +15 -0
new file mode 100644
index 00000000..03337083
@@ -0,0 +1,15 @@
+QA output created by 521
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +1 -0
index ed0d389e..1c8ec5fa 100644
@@ -517,3 +517,4 @@
 518 auto quick quota
 519 auto quick reflink
 520 auto quick reflink
+521 auto repair
Signature · 1 line
2.18.4
#9 lore raw
Quoted 5 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

Thanks for the revision! But I'm still seeing the following diff with v5.9-rc2 kernel and latest xfsprogs for-next branch, which should contains the progress reporting patches I guess (HEAD is commit 2cf166bca8a2 ("xfs_db: set b_ops to NULL in set_cur for types without verifiers"))

Format and populate
Introduce a dmdelay
Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time
- #:#:#: Phase #: #% done - estimated remaining time # minute, # second
- #:#:#: Phase #: elapsed time # second - processed # inodes per minute
- #:#:#: check for inodes claiming duplicate blocks - # of # inodes done

Thanks,
Eryu

Quoted 130 lines

---
Changes since v2:
- Fix cleanup handling and function naming
- Added to auto group
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

 tests/xfs/521     | 75 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/521.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 91 insertions(+)
 create mode 100755 tests/xfs/521
 create mode 100644 tests/xfs/521.out
tests/xfs/521 new file +75 -0
new file mode 100755
index 00000000..c16c82bf
@@ -0,0 +1,75 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 521
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+	_cleanup_delay > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $tmp.repair
+
+cat $tmp.repair | filter_repair | sort -u
+
+# success, all done
+status=0
+exit
tests/xfs/521.out new file +15 -0
new file mode 100644
index 00000000..03337083
@@ -0,0 +1,15 @@
+QA output created by 521
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +1 -0
index ed0d389e..1c8ec5fa 100644
@@ -517,3 +517,4 @@
 518 auto quick quota
 519 auto quick reflink
 520 auto quick reflink
+521 auto repair
Signature · 1 line
2.18.4
#10 lore raw
Quoted 13 lines · Eryu Guan
Quoted 5 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

Thanks for the revision! But I'm still seeing the following diff with v5.9-rc2 kernel and latest xfsprogs for-next branch, which should contains the progress reporting patches I guess (HEAD is commit 2cf166bca8a2 ("xfs_db: set b_ops to NULL in set_cur for types without verifiers"))

Quoted 7 lines

Format and populate
Introduce a dmdelay
Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time
- #:#:#: Phase #: #% done - estimated remaining time # minute, # second
- #:#:#: Phase #: elapsed time # second - processed # inodes per minute
- #:#:#: check for inodes claiming duplicate blocks - # of # inodes done

When testing this I only saw cases with minute(s) and second(s), but it turns out that the duration function in xfs_repair/progress.c can produce an empty string or combinations of second, seconds, minute, minutes, day, days, week, or weeks.

This can affect the estimate string, but also the elapsed time like
#:#:#: Phase #: #% done - estimated remaining time # second #:#:#: Phase #: elapsed time # second - processed # inodes per minute #:#:#: Phase #: elapsed time # seconds - processed # inodes per minute

I'll need to filter output from progress() specifically.

Thanks for pointing this out.

Don

Quoted 132 lines
Quoted 131 lines

---
Changes since v2:
- Fix cleanup handling and function naming
- Added to auto group
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

 tests/xfs/521     | 75 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/521.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 91 insertions(+)
 create mode 100755 tests/xfs/521
 create mode 100644 tests/xfs/521.out
tests/xfs/521 new file +75 -0
new file mode 100755
index 00000000..c16c82bf
@@ -0,0 +1,75 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 521
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+	_cleanup_delay > /dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $tmp.repair
+
+cat $tmp.repair | filter_repair | sort -u
+
+# success, all done
+status=0
+exit
tests/xfs/521.out new file +15 -0
new file mode 100644
index 00000000..03337083
@@ -0,0 +1,15 @@
+QA output created by 521
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +1 -0
index ed0d389e..1c8ec5fa 100644
@@ -517,3 +517,4 @@
 518 auto quick quota
 519 auto quick reflink
 520 auto quick reflink
+521 auto repair
Signature · 1 line
2.18.4
#11 lore raw
In reply to Donald Douwsma
Quoted 36 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

 tests/xfs/516     | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 92 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +11 -0
new file mode 100755
index 00000000..1c0508ef
@@ -0,0 +1,76 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"

tests/xfs/516 line 21

Quoted 10 lines
tests/xfs/516 new file +10 -0
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1

How about use the helper, avoid using the 'delay-test' name at here? _cleanup_delay > /dev/null 2>&1

Quoted 61 lines
tests/xfs/516 new file +55 -0
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $seqres.xfs_repair.out
+
+cat $seqres.xfs_repair.out | _filter_repair | sort -u
+
+_cleanup_delay
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +0 -0
new file mode 100644
index 00000000..85018b93

tests/xfs/516.out line 5

Quoted 5 lines
tests/xfs/516.out new file +5 -0
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second

I just tested on latest upstream xfsprogs-dev for-next branch, it failed as:

root/git/xfstests-dev/results//xfs/516.out.bad 2020-05-29 15:40:13.401777675 +0800 renamed from root/git/xfstests-dev/tests/xfs/516.out 2020-05-29 15:31:06.602440261 +0800 +1 -0
@@ -3,6 +3,7 @@
 Introduce a dmdelay
 Run repair
  - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: #% done - estimated remaining time # second
  - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
  - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
  - #:#:#: process known inodes and inode discovery - # of # inodes done
Quoted 15 lines
tests/xfs/516.out new file +10 -0
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +0 -0
index 12eb55c9..aeeca23f 100644

tests/xfs/group line 516

Quoted 4 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Is there a reason why this case shouldn't be in auto group?

Thanks,
Zorro

Quoted 3 lines
Signature · 1 line
2.18.4
#12 lore raw

Hi Zorro,

Quoted 153 lines · Zorro Lang
Quoted 36 lines · Donald Douwsma

xfs_repair's interval based progress has been broken for some time, create a test based on dmdelay to stretch out the time and use ag_stride to force parallelism.

---
Changes since v1:
- Use _scratch_xfs_repair
- Filter only repair output
- Make the filter more tolerant of whitespace and plurals
- Take golden output from 'xfs_repair: fix progress reporting'

 tests/xfs/516     | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/516.out | 15 ++++++++++
 tests/xfs/group   |  1 +
 3 files changed, 92 insertions(+)
 create mode 100755 tests/xfs/516
 create mode 100644 tests/xfs/516.out
tests/xfs/516 new file +11 -0
new file mode 100755
index 00000000..1c0508ef
@@ -0,0 +1,76 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 516
+#
+# Test xfs_repair's progress reporting
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"

tests/xfs/516 line 21

Quoted 10 lines
tests/xfs/516 new file +10 -0
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_dmsetup_remove delay-test > /dev/null 2>&1

How about use the helper, avoid using the 'delay-test' name at here? _cleanup_delay > /dev/null 2>&1

Quoted 61 lines
tests/xfs/516 new file +55 -0
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmdelay
+. ./common/populate
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os Linux
+_require_scratch
+_require_dm_target delay
+
+# Filter output specific to the formatters in xfs_repair/progress.c
+# Ideally we'd like to see hits on anything that matches
+# awk '/{FMT/' repair/progress.c
+_filter_repair()
+{
+	sed -ne '
+	s/[0-9]\+/#/g;
+	s/^\s\+/ /g;
+	s/\(second\|minute\)s/\1/g
+	/#:#:#:/p
+	'
+}
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+echo "Introduce a dmdelay"
+_init_delay
+
+# Introduce a read I/O delay
+# The default in common/dmdelay is a bit too agressive
+BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
+DELAY_TABLE_RDELAY="0 $BLK_DEV_SIZE delay $SCRATCH_DEV 0 100 $SCRATCH_DEV 0 0"
+_load_delay_table $DELAY_READ
+
+echo "Run repair"
+SCRATCH_DEV=$DELAY_DEV _scratch_xfs_repair -o ag_stride=4 -t 1 2>&1 |
+        tee -a $seqres.full > $seqres.xfs_repair.out
+
+cat $seqres.xfs_repair.out | _filter_repair | sort -u
+
+_cleanup_delay
+
+# success, all done
+status=0
+exit
tests/xfs/516.out new file +0 -0
new file mode 100644
index 00000000..85018b93

tests/xfs/516.out line 5

Quoted 5 lines
tests/xfs/516.out new file +5 -0
@@ -0,0 +1,15 @@
+QA output created by 516
+Format and populate
+Introduce a dmdelay
+Run repair
+ - #:#:#: Phase #: #% done - estimated remaining time # minute, # second

I just tested on latest upstream xfsprogs-dev for-next branch, it failed as:

root/git/xfstests-dev/results//xfs/516.out.bad 2020-05-29 15:40:13.401777675 +0800 renamed from root/git/xfstests-dev/tests/xfs/516.out 2020-05-29 15:31:06.602440261 +0800 +1 -0
@@ -3,6 +3,7 @@
 Introduce a dmdelay
 Run repair
  - #:#:#: Phase #: #% done - estimated remaining time # minute, # second
+ - #:#:#: Phase #: #% done - estimated remaining time # second
  - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
  - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
  - #:#:#: process known inodes and inode discovery - # of # inodes done
Quoted 17 lines
tests/xfs/516.out new file +10 -0
+ - #:#:#: Phase #: elapsed time # second - processed # inodes per minute
+ - #:#:#: check for inodes claiming duplicate blocks - # of # inodes done
+ - #:#:#: process known inodes and inode discovery - # of # inodes done
+ - #:#:#: process newly discovered inodes - # of # allocation groups done
+ - #:#:#: rebuild AG headers and trees - # of # allocation groups done
+ - #:#:#: scanning agi unlinked lists - # of # allocation groups done
+ - #:#:#: scanning filesystem freespace - # of # allocation groups done
+ - #:#:#: setting up duplicate extent list - # of # allocation groups done
+ - #:#:#: verify and correct link counts - # of # allocation groups done
+ - #:#:#: zeroing log - # of # blocks done
tests/xfs/group +0 -0
index 12eb55c9..aeeca23f 100644

tests/xfs/group line 516

Quoted 4 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Is there a reason why this case shouldn't be in auto group?

Quoted 2 lines

Thanks,
Zorro

We could work to wards getting it into auto, I wanted to make sure it was working ok first.

It takes about 2.5 min to run with the current image used by _scratch_populate_cached, by its nature it needs time for the progress code to fire, but that may be ok.

It sometimes leaves the delay-test active, I think because I've I used _dmsetup_remove in _cleanup instead of _cleanup_delay because the later unmounts the filesystem, which this test doesnt do, but I'd have to look into this more so it plays well with other tests like the original dmdelay unmount test 311.

I wasn't completely happy with the filter, it only checks that any of the progress messages are printing at least once, which for most can still just match on the end of phase printing, which always worked. Ideally it would check that some of these messages print multiple times.

I can work on a V3 if this hasn't merged yet, or a follow up after, thoughts?

Cheers,
Don

#13 lore raw
Quoted 4 lines · Donald Douwsma

Hi Zorro,

Quoted 1 line · Zorro Lang

On Wed, May 20, 2020 at 01:52:58PM +1000, Donald Douwsma wrote:

<snip>

Quoted 21 lines
Quoted 10 lines

tests/xfs/group line 516

Quoted 7 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Is there a reason why this case shouldn't be in auto group?

Quoted 2 lines

Thanks,
Zorro

We could work to wards getting it into auto, I wanted to make sure it was working ok first.

It takes about 2.5 min to run with the current image used by _scratch_populate_cached, by its nature it needs time for the progress code to fire, but that may be ok.

Quoted 5 lines

It sometimes leaves the delay-test active, I think because I've I used _dmsetup_remove in _cleanup instead of _cleanup_delay because the later unmounts the filesystem, which this test doesnt do, but I'd have to look into this more so it plays well with other tests like the original dmdelay unmount test 311.

Actually it does clean up delay-test correctly (*cough* I may have been backgrounding xfs_repair in my xfstests tree while testing something else). I have seen it leave delay-test around if terminated with ctrl+c, but that seems reasonable if a test is aborted.

Quoted 7 lines

I wasn't completely happy with the filter, it only checks that any of the progress messages are printing at least once, which for most can still just match on the end of phase printing, which always worked. Ideally it would check that some of these messages print multiple times.

I can work on a V3 if this hasn't merged yet, or a follow up after, thoughts?

#14 lore raw
Quoted 20 lines · Donald Douwsma
Quoted 4 lines · Donald Douwsma

Hi Zorro,

Quoted 1 line · Zorro Lang

On Wed, May 20, 2020 at 01:52:58PM +1000, Donald Douwsma wrote:

<snip>

Quoted 10 lines
Quoted 10 lines

tests/xfs/group line 516

Quoted 7 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Is there a reason why this case shouldn't be in auto group?

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

Thanks,
Zorro

We could work to wards getting it into auto, I wanted to make sure it was working ok first.

I just rechecked the mail list, sorry I missed this email long time (CC me will make sure I won't miss it next time:)

I think several minutes running time is acceptable to be into auto group, if the case is stable enough, won't fail unexpected.

Quoted 11 lines
Quoted 10 lines

It takes about 2.5 min to run with the current image used by _scratch_populate_cached, by its nature it needs time for the progress code to fire, but that may be ok.

It sometimes leaves the delay-test active, I think because I've I used _dmsetup_remove in _cleanup instead of _cleanup_delay because the later unmounts the filesystem, which this test doesnt do, but I'd have to look into this more so it plays well with other tests like the original dmdelay unmount test 311.

Quoted 4 lines

Actually it does clean up delay-test correctly (*cough* I may have been backgrounding xfs_repair in my xfstests tree while testing something else). I have seen it leave delay-test around if terminated with ctrl+c, but that seems reasonable if a test is aborted.

If use a common helper to DO a test, I'd like to use its corresponding helper to cleanup UNDO it. If there's still something wrong, we can fix the helpers.

Quoted 7 lines
Quoted 7 lines

I wasn't completely happy with the filter, it only checks that any of the progress messages are printing at least once, which for most can still just match on the end of phase printing, which always worked. Ideally it would check that some of these messages print multiple times.

I can work on a V3 if this hasn't merged yet, or a follow up after, thoughts?

Sure, hope the V3 can improve the output mismatch issue, although the filter is really boring:)

Thanks,
Zorro

Quoted 3 lines
Quoted 1 line
#15 lore raw

Hi Zorry,

Quoted 25 lines · Zorro Lang
Quoted 24 lines · Donald Douwsma
Quoted 4 lines · Donald Douwsma

Hi Zorro,

Quoted 1 line · Zorro Lang

On Wed, May 20, 2020 at 01:52:58PM +1000, Donald Douwsma wrote:

<snip>

Quoted 14 lines
Quoted 12 lines

tests/xfs/group line 516

Quoted 7 lines
tests/xfs/group +1 -0
@@ -513,3 +513,4 @@
 513 auto mount
 514 auto quick db
 515 auto quick quota
+516 repair

Is there a reason why this case shouldn't be in auto group?

Thanks,
Zorro

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

We could work to wards getting it into auto, I wanted to make sure it was working ok first.

I just rechecked the mail list, sorry I missed this email long time (CC me will make sure I won't miss it next time:)

Will do,

Quoted 2 lines

I think several minutes running time is acceptable to be into auto group, if the case is stable enough, won't fail unexpected.

Ok, I'll submit with it added to the auto group as well.

Quoted 26 lines
Quoted 11 lines
Quoted 10 lines

It takes about 2.5 min to run with the current image used by _scratch_populate_cached, by its nature it needs time for the progress code to fire, but that may be ok.

It sometimes leaves the delay-test active, I think because I've I used _dmsetup_remove in _cleanup instead of _cleanup_delay because the later unmounts the filesystem, which this test doesnt do, but I'd have to look into this more so it plays well with other tests like the original dmdelay unmount test 311.

Quoted 4 lines

Actually it does clean up delay-test correctly (*cough* I may have been backgrounding xfs_repair in my xfstests tree while testing something else). I have seen it leave delay-test around if terminated with ctrl+c, but that seems reasonable if a test is aborted.

If use a common helper to DO a test, I'd like to use its corresponding helper to cleanup UNDO it. If there's still something wrong, we can fix the helpers.

Quoted 6 lines
Quoted 6 lines

I wasn't completely happy with the filter, it only checks that any of the progress messages are printing at least once, which for most can still just match on the end of phase printing, which always worked. Ideally it would check that some of these messages print multiple times.

Quoted 4 lines
Quoted 1 line
Quoted 1 line

I can work on a V3 if this hasn't merged yet, or a follow up after, thoughts?

Sure, hope the V3 can improve the output mismatch issue, although the filter is really boring:)

I think boring may be safer if its going into the auto group.

I'd like to stick with the boring filter to start with, I dont want to make it too fragile if the image changes.

Quoted 4 lines
Quoted 3 lines
Quoted 1 line