Skip to contentSkip to conversation

Fix/harden "quick" tests for realtime subvolumes

PATCH Superseded Richard Wareing 2 participants 8 messages Jan 11, 2018

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover Fix/harden "quick" tests for realtime subvolumes

Applies clean to commit 95c924c65113d2b706436d8cd09cd391eddb795a.

Kernel: 4.14-rc8 (Commit 39dae59d66acd86d1de24294bd2f343fd5e7a625) MKFS_OPTIONS="-m finobt=1,crc=1,reflink=1"

Updated patch set to address comments made by reviewers. Changes are noted on the patches.

A couple of tests (e.g. tests/xfs/191-input-validation) which work for Eryu still fail for me, but I'll comment on those w/ sample output on the mailing list, as I might have some toolchain issue on my end.

==== Original Cover Letter ===

Some tests have issues when being run with realtime subvolumes. This patch set aims to harden fs tests so we can get reliable/reproducible test runs with fstests for realtime subvolumes.

Two new _require functions are introduced along with a new flag to automatically set the rtinherit=1 option upon mkfs'ing.

The problems I found were usually one of:
1. Snapshot + subsequent test being performed without regard to the realtime subvolume.
2. Use of functions which are not supported by realtime devices. Not setting rtinherit on scratch devices for these cases fixes these tests. Non-scratch cases are more tricky since we don't control what goes into the MKFS_OPTIONS variable.
3. xfs_repair being used directly without checking for RT devices.

After fixing these cases, you get 86 good "quick: xfs tests & 180 good "quick" generic tests with the bulk are not run due to the lack of reflink and/or quota support on realtime scratch targets.

P.S I haven't forgotten about the non-"quick" tests, but I had to start somewhere, and break this up a bit into a more manageable problem.

Richard Wareing (3):
xfs/realtime: Add require_no_realtime function xfs/realtime: Default rtinherit=1, add _require_no_rtinherit function xfs/realtime: Fix direct invocations of xfs_repair

 common/rc         | 29 +++++++++++++++++++++++++++--
 tests/generic/250 |  3 +++
 tests/generic/252 |  3 +++
 tests/generic/441 |  3 +++
 tests/xfs/070     |  5 ++++-
 tests/xfs/077     |  2 ++
 tests/xfs/170     |  1 +
 tests/xfs/189     |  1 +
 tests/xfs/284     |  2 ++
 tests/xfs/291     |  5 ++++-
 10 files changed, 50 insertions(+), 4 deletions(-)
Signature · 1 line
2.9.5
#1 lore raw

PATCH v3 1/3 xfs/realtime: Add require_no_realtime function

Some tests do not play well with realtime devices, in an effort to produce a stable set of test which exercise the realtime code paths we introduce a _require_no_realtime function to allow tests to opt out of realtime subvolume test runs.

---
Changes since v2:
* Fixed tests generic/409-411, _get_mount now honors $SCRATCH_OPTIONS
* tests/xfs/202 reverted, the test does indeed work with larger test device
* Added comments explaining why _require_no_realtime was declared

Changes since v1:
* None

 common/rc     | 18 ++++++++++++++++--
 tests/xfs/077 |  2 ++
 tests/xfs/189 |  1 +
 tests/xfs/284 |  2 ++
 4 files changed, 21 insertions(+), 2 deletions(-)
common/rc +16 -2
index 9216efd..f5fe739 100644
@@ -198,8 +198,14 @@ _mount()
 _get_mount()
 {
 	local mnt_point=${!#}
+	local mnt_dev=${@:(-2):1}
+        local scratch_opts=""
+	if [ "$mnt_dev" == "$SCRATCH_DEV" ]; then
+		_scratch_options mount
+		scratch_opts="$SCRATCH_OPTIONS"
+	fi
 
-	_mount $*
+	_mount $scratch_opts $*
 	if [ $? -eq 0 ]; then
 		MOUNTED_POINT_STACK="$mnt_point $MOUNTED_POINT_STACK"
 	else
@@ -230,7 +236,7 @@ _clear_mount_stack()
 
 _scratch_options()
 {
-    type=$1
+    local type=$1
     SCRATCH_OPTIONS=""
 
     if [ "$FSTYP" != "xfs" ]; then
@@ -1737,6 +1743,14 @@ _require_realtime()
 	_notrun "Realtime device required, skipped this test"
 }
 
+# This test requires that a realtime subvolume is not in use
+#
+_require_no_realtime()
+{
+    [ -n "$SCRATCH_RTDEV" ] && \
+	_notrun "Test not compatible with realtime subvolumes, skipped this test"
+}
+
 # this test requires that a specified command (executable) exists
 # $1 - command, $2 - name for error message
 #
tests/xfs/077 +2 -0
index eba4f08..6d5ac1a 100755
@@ -50,6 +50,8 @@ _cleanup()
 
 _supported_fs xfs
 _supported_os Linux
+# xfs_copy does not support realtime devices
+_require_no_realtime
 _require_scratch
 _require_xfs_crc
 _require_meta_uuid
tests/xfs/189 +1 -0
index 636f6f0..699eb3c 100755
@@ -236,6 +236,7 @@ _putback_scratch_fstab()
 _supported_fs xfs
 _supported_os Linux
 
+_require_no_realtime
 _require_scratch
 _require_noattr2
 
tests/xfs/284 +2 -0
index e3625fe..d0eb5bd 100755
@@ -49,6 +49,8 @@ rm -f $seqres.full
 # real QA test starts here
 _supported_fs xfs
 _supported_os Linux
+# xfs_copy does not support realtime devices
+_require_no_realtime
 _require_test
 _require_scratch
 
Signature · 1 line
2.9.5
#2 lore raw

Re: [PATCH v3 1/3] xfs/realtime: Add require_no_realtime function

Quoted 27 lines · Richard Wareing

Some tests do not play well with realtime devices, in an effort to produce a stable set of test which exercise the realtime code paths we introduce a _require_no_realtime function to allow tests to opt out of realtime subvolume test runs.

---
Changes since v2:
* Fixed tests generic/409-411, _get_mount now honors $SCRATCH_OPTIONS
* tests/xfs/202 reverted, the test does indeed work with larger test device
* Added comments explaining why _require_no_realtime was declared

Changes since v1:
* None

 common/rc     | 18 ++++++++++++++++--
 tests/xfs/077 |  2 ++
 tests/xfs/189 |  1 +
 tests/xfs/284 |  2 ++
 4 files changed, 21 insertions(+), 2 deletions(-)
common/rc +0 -0
index 9216efd..f5fe739 100644

common/rc _mount() · line 202

Quoted 5 lines
common/rc +2 -0
@@ -198,8 +198,14 @@ _mount()
 _get_mount()
 {
 	local mnt_point=${!#}
+	local mnt_dev=${@:(-2):1}
+        local scratch_opts=""

tab/space indentation problem?

common/rc _mount() · line 203

Quoted 1 line
common/rc +1 -0
+	if [ "$mnt_dev" == "$SCRATCH_DEV" ]; then

"=" for comparison, not "==" (it's bashism, though we probably don't care...?)

Quoted 19 lines
common/rc +5 -2
+		_scratch_options mount
+		scratch_opts="$SCRATCH_OPTIONS"
+	fi
 
-	_mount $*
+	_mount $scratch_opts $*
 	if [ $? -eq 0 ]; then
 		MOUNTED_POINT_STACK="$mnt_point $MOUNTED_POINT_STACK"
 	else
@@ -230,7 +236,7 @@ _clear_mount_stack()
 
 _scratch_options()
 {
-    type=$1
+    local type=$1
     SCRATCH_OPTIONS=""
 
     if [ "$FSTYP" != "xfs" ]; then

common/rc _require_realtime() · line 1751

Quoted 9 lines
common/rc +6 -0
@@ -1737,6 +1743,14 @@ _require_realtime()
 	_notrun "Realtime device required, skipped this test"
 }
 
+# This test requires that a realtime subvolume is not in use
+#
+_require_no_realtime()
+{
+    [ -n "$SCRATCH_RTDEV" ] && \
+	_notrun "Test not compatible with realtime subvolumes, skipped this test"

Do we have to check USE_EXTERNAL = yes here too?

Quoted 10 lines
common/rc +2 -0
+}
+
 # this test requires that a specified command (executable) exists
 # $1 - command, $2 - name for error message
 #
tests/xfs/077 +0 -0
index eba4f08..6d5ac1a 100755

tests/xfs/077 _cleanup() · line 53

Quoted 4 lines
tests/xfs/077 +1 -0
@@ -50,6 +50,8 @@ _cleanup()
 
 _supported_fs xfs
 _supported_os Linux
+# xfs_copy does not support realtime devices

This seems like more of a bug in xfs_copy to me... :)

--D

Quoted 36 lines
tests/xfs/077 +1 -0
+_require_no_realtime
 _require_scratch
 _require_xfs_crc
 _require_meta_uuid
tests/xfs/189 +1 -0
index 636f6f0..699eb3c 100755
@@ -236,6 +236,7 @@ _putback_scratch_fstab()
 _supported_fs xfs
 _supported_os Linux
 
+_require_no_realtime
 _require_scratch
 _require_noattr2
 
tests/xfs/284 +2 -0
index e3625fe..d0eb5bd 100755
@@ -49,6 +49,8 @@ rm -f $seqres.full
 # real QA test starts here
 _supported_fs xfs
 _supported_os Linux
+# xfs_copy does not support realtime devices
+_require_no_realtime
 _require_test
 _require_scratch
 
Signature · 6 lines
2.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Re: [PATCH v3 1/3] xfs/realtime: Add require_no_realtime function

Quoted 23 lines · Darrick J. Wong
Quoted 22 lines · Richard Wareing

Some tests do not play well with realtime devices, in an effort to produce a stable set of test which exercise the realtime code paths we introduce a _require_no_realtime function to allow tests to opt out of realtime subvolume test runs.

---
Changes since v2:
* Fixed tests generic/409-411, _get_mount now honors $SCRATCH_OPTIONS
* tests/xfs/202 reverted, the test does indeed work with larger test device
* Added comments explaining why _require_no_realtime was declared

Changes since v1:
* None

 common/rc     | 18 ++++++++++++++++--
 tests/xfs/077 |  2 ++
 tests/xfs/189 |  1 +
 tests/xfs/284 |  2 ++
 4 files changed, 21 insertions(+), 2 deletions(-)
Quoted 12 lines

common/rc _mount() · line 202

Quoted 10 lines
common/rc +2 -0
index 9216efd..f5fe739 100644
@@ -198,8 +198,14 @@ _mount()
 _get_mount()
 {
 	local mnt_point=${!#}
+	local mnt_dev=${@:(-2):1}
+        local scratch_opts=""

tab/space indentation problem?

Yup my bad, fixing.

Quoted 27 lines

common/rc _mount() · line 203

Quoted 2 lines
common/rc +1 -0
+	if [ "$mnt_dev" == "$SCRATCH_DEV" ]; then

"=" for comparison, not "==" (it's bashism, though we probably don't care...?)

Quoted 22 lines
common/rc +5 -2
+		_scratch_options mount
+		scratch_opts="$SCRATCH_OPTIONS"
+	fi
 
-	_mount $*
+	_mount $scratch_opts $*
 	if [ $? -eq 0 ]; then
 		MOUNTED_POINT_STACK="$mnt_point $MOUNTED_POINT_STACK"
 	else
@@ -230,7 +236,7 @@ _clear_mount_stack()
 
 _scratch_options()
 {
-    type=$1
+    local type=$1
     SCRATCH_OPTIONS=""
 
     if [ "$FSTYP" != "xfs" ]; then
@@ -1737,6 +1743,14 @@ _require_realtime()
 	_notrun "Realtime device required, skipped this test"
 }
 
Quoted 9 lines
Quoted 7 lines
common/rc +6 -0
+# This test requires that a realtime subvolume is not in use
+#
+_require_no_realtime()
+{
+    [ -n "$SCRATCH_RTDEV" ] && \
+	_notrun "Test not compatible with realtime subvolumes, skipped this  

test"

Do we have to check USE_EXTERNAL = yes here too?

Ya that's probably fair, I'll fix this.

Quoted 12 lines
Quoted 12 lines
common/rc +2 -0
+}
+
 # this test requires that a specified command (executable) exists
 # $1 - command, $2 - name for error message
 #
tests/xfs/077 +0 -0
index eba4f08..6d5ac1a 100755
@@ -50,6 +50,8 @@ _cleanup()
 
Quoted 6 lines

tests/xfs/077 _cleanup() · line 53

Quoted 3 lines
tests/xfs/077 +1 -0
 _supported_fs xfs
 _supported_os Linux
+# xfs_copy does not support realtime devices

This seems like more of a bug in xfs_copy to me... :)

Agreed, it would be nice to get this fixed.

Quoted 42 lines

--D

Quoted 36 lines
tests/xfs/077 +1 -0
+_require_no_realtime
 _require_scratch
 _require_xfs_crc
 _require_meta_uuid
tests/xfs/189 +1 -0
index 636f6f0..699eb3c 100755
@@ -236,6 +236,7 @@ _putback_scratch_fstab()
 _supported_fs xfs
 _supported_os Linux
 
+_require_no_realtime
 _require_scratch
 _require_noattr2
 
tests/xfs/284 +2 -0
index e3625fe..d0eb5bd 100755
@@ -49,6 +49,8 @@ rm -f $seqres.full
 # real QA test starts here
 _supported_fs xfs
 _supported_os Linux
+# xfs_copy does not support realtime devices
+_require_no_realtime
 _require_test
 _require_scratch
 
Signature · 6 lines
2.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" 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-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

PATCH v3 2/3 xfs/realtime: Default rtinherit=1, add _require_no_rtinherit function

In reply to Richard Wareing

To better exercise the data path code of realtime subvolumes, we will set rtinherit=1 during mkfs calls. For tests which this is not desired we introduce a _require_no_rtinherit function to opt out of this behavior.

---
Changes since v2:
* Removed use of RT_INHERT, instead we now simply bail from the test. Users will have to create two separate configs for realtime one with rtinherit=1 in the mkfs options, one without and do separate runs to get full test coverage.
* Added comments explaining reasons for _require_no_rtinherit declarations

Changes since v1:
* None

 common/rc         | 11 +++++++++++
 tests/generic/250 |  3 +++
 tests/generic/252 |  3 +++
 tests/generic/441 |  3 +++
 tests/xfs/170     |  1 +
 5 files changed, 21 insertions(+)
common/rc +11 -0
index f5fe739..1720a72 100644
@@ -33,6 +33,17 @@ BC=$(which bc 2> /dev/null) || BC=
 VALID_TEST_ID="[0-9]\{3\}"
 VALID_TEST_NAME="$VALID_TEST_ID-\?[[:alnum:]-]*"
 
+# When running tests with a realtime device configured, the realtime inherit
+# flag will be set during mkfs via -d rtinherit=1 option.  For some tests
+# this may render the test invalid (i.e. it uses a function which is not
+# supported by the realtime subvolume); to prevent failure these tests may
+# disable this behavior by calling _require_no_rtinherit .
+_require_no_rtinherit()
+{
+  echo "$MKFS_OPTIONS" | egrep -q "rtinherit([^=]|=1)" && \
+    _notrun "rtinherit mkfs option is not supported by this test."
+}
+
 _require_math()
 {
 	if [ -z "$BC" ]; then
tests/generic/250 +3 -0
index 3c4fe6d..a8fd97e 100755
@@ -48,6 +48,9 @@ _require_scratch
 _require_dm_target error
 _require_xfs_io_command "falloc"
 _require_odirect
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 
 rm -f $seqres.full
 
tests/generic/252 +3 -0
index ffedd56..b506d59 100755
@@ -47,6 +47,9 @@ _supported_os Linux
 _require_scratch
 _require_dm_target error
 _require_xfs_io_command "falloc"
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 _require_aiodio "aiocp"
 AIO_TEST="src/aio-dio-regress/aiocp"
 
tests/generic/441 +3 -0
index 075d877..5fbfece 100755
@@ -47,6 +47,9 @@ _cleanup()
 # real QA test starts here
 _supported_os Linux
 _require_scratch
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 
 # Generally, we want to avoid journal errors on the extended testcase. Only
 # unset the -s flag if we have a logdev
tests/xfs/170 +1 -0
index c5ae8e4..6deef1b 100755
@@ -50,6 +50,7 @@ _supported_fs xfs
 _supported_os Linux
 
 _require_scratch
+_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
Signature · 1 line
2.9.5
#5 lore raw

Re: [PATCH v3 2/3] xfs/realtime: Default rtinherit=1, add _require_no_rtinherit function

Quoted 31 lines · Richard Wareing

To better exercise the data path code of realtime subvolumes, we will set rtinherit=1 during mkfs calls. For tests which this is not desired we introduce a _require_no_rtinherit function to opt out of this behavior.

---
Changes since v2:
* Removed use of RT_INHERT, instead we now simply bail from the test. Users will have to create two separate configs for realtime one with rtinherit=1 in the mkfs options, one without and do separate runs to get full test coverage.
* Added comments explaining reasons for _require_no_rtinherit declarations

Changes since v1:
* None

 common/rc         | 11 +++++++++++
 tests/generic/250 |  3 +++
 tests/generic/252 |  3 +++
 tests/generic/441 |  3 +++
 tests/xfs/170     |  1 +
 5 files changed, 21 insertions(+)
common/rc +0 -0
index f5fe739..1720a72 100644
@@ -33,6 +33,17 @@ BC=$(which bc 2> /dev/null) || BC=
 VALID_TEST_ID="[0-9]\{3\}"
 VALID_TEST_NAME="$VALID_TEST_ID-\?[[:alnum:]-]*"

common/rc BC=$(which bc 2> /dev/null) || BC= · line 44

Quoted 10 lines
common/rc +9 -0
 
+# When running tests with a realtime device configured, the realtime inherit
+# flag will be set during mkfs via -d rtinherit=1 option.  For some tests
+# this may render the test invalid (i.e. it uses a function which is not
+# supported by the realtime subvolume); to prevent failure these tests may
+# disable this behavior by calling _require_no_rtinherit .
+_require_no_rtinherit()
+{
+  echo "$MKFS_OPTIONS" | egrep -q "rtinherit([^=]|=1)" && \
+    _notrun "rtinherit mkfs option is not supported by this test."

It's worth checking that FSTYP==xfs since this feature only exists in xfs.

--D

Quoted 66 lines
common/rc +2 -0
+}
+
 _require_math()
 {
 	if [ -z "$BC" ]; then
tests/generic/250 +3 -0
index 3c4fe6d..a8fd97e 100755
@@ -48,6 +48,9 @@ _require_scratch
 _require_dm_target error
 _require_xfs_io_command "falloc"
 _require_odirect
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 
 rm -f $seqres.full
 
tests/generic/252 +3 -0
index ffedd56..b506d59 100755
@@ -47,6 +47,9 @@ _supported_os Linux
 _require_scratch
 _require_dm_target error
 _require_xfs_io_command "falloc"
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 _require_aiodio "aiocp"
 AIO_TEST="src/aio-dio-regress/aiocp"
 
tests/generic/441 +3 -0
index 075d877..5fbfece 100755
@@ -47,6 +47,9 @@ _cleanup()
 # real QA test starts here
 _supported_os Linux
 _require_scratch
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 
 # Generally, we want to avoid journal errors on the extended testcase. Only
 # unset the -s flag if we have a logdev
tests/xfs/170 +1 -0
index c5ae8e4..6deef1b 100755
@@ -50,6 +50,7 @@ _supported_fs xfs
 _supported_os Linux
 
 _require_scratch
+_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
Signature · 6 lines
2.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

Re: [PATCH v3 2/3] xfs/realtime: Default rtinherit=1, add _require_no_rtinherit function

Quoted 33 lines · Darrick J. Wong
Quoted 32 lines · Richard Wareing

To better exercise the data path code of realtime subvolumes, we will set rtinherit=1 during mkfs calls. For tests which this is not desired we introduce a _require_no_rtinherit function to opt out of this behavior.

---
Changes since v2:
* Removed use of RT_INHERT, instead we now simply bail from the test. Users will have to create two separate configs for realtime one with rtinherit=1 in the mkfs options, one without and do separate runs to get full test coverage.
* Added comments explaining reasons for _require_no_rtinherit declarations

Changes since v1:
* None

 common/rc         | 11 +++++++++++
 tests/generic/250 |  3 +++
 tests/generic/252 |  3 +++
 tests/generic/441 |  3 +++
 tests/xfs/170     |  1 +
 5 files changed, 21 insertions(+)
common/rc +0 -0
index f5fe739..1720a72 100644
@@ -33,6 +33,17 @@ BC=$(which bc 2> /dev/null) || BC=
 VALID_TEST_ID="[0-9]\{3\}"
 VALID_TEST_NAME="$VALID_TEST_ID-\?[[:alnum:]-]*"
 
Quoted 14 lines

common/rc BC=$(which bc 2> /dev/null) || BC= · line 44

Quoted 11 lines
common/rc +1 -0
+# When running tests with a realtime device configured, the realtime  

inherit

common/rc +3 -0
+# flag will be set during mkfs via -d rtinherit=1 option.  For some tests
+# this may render the test invalid (i.e. it uses a function which is not
+# supported by the realtime subvolume); to prevent failure these tests  

may

common/rc +5 -0
+# disable this behavior by calling _require_no_rtinherit .
+_require_no_rtinherit()
+{
+  echo "$MKFS_OPTIONS" | egrep -q "rtinherit([^=]|=1)" && \
+    _notrun "rtinherit mkfs option is not supported by this test."

It's worth checking that FSTYP==xfs since this feature only exists in xfs.

Not a problem, probably worth doing for clarity too.

Quoted 72 lines

--D

Quoted 66 lines
common/rc +2 -0
+}
+
 _require_math()
 {
 	if [ -z "$BC" ]; then
tests/generic/250 +3 -0
index 3c4fe6d..a8fd97e 100755
@@ -48,6 +48,9 @@ _require_scratch
 _require_dm_target error
 _require_xfs_io_command "falloc"
 _require_odirect
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 
 rm -f $seqres.full
 
tests/generic/252 +3 -0
index ffedd56..b506d59 100755
@@ -47,6 +47,9 @@ _supported_os Linux
 _require_scratch
 _require_dm_target error
 _require_xfs_io_command "falloc"
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 _require_aiodio "aiocp"
 AIO_TEST="src/aio-dio-regress/aiocp"
 
tests/generic/441 +3 -0
index 075d877..5fbfece 100755
@@ -47,6 +47,9 @@ _cleanup()
 # real QA test starts here
 _supported_os Linux
 _require_scratch
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
 
 # Generally, we want to avoid journal errors on the extended testcase. Only
 # unset the -s flag if we have a logdev
tests/xfs/170 +1 -0
index c5ae8e4..6deef1b 100755
@@ -50,6 +50,7 @@ _supported_fs xfs
 _supported_os Linux
 
 _require_scratch
+_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
Signature · 6 lines
2.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" 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-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

PATCH v3 3/3 xfs/realtime: Fix direct invocations of xfs_repair

In reply to Richard Wareing

Fixes direct invocations of xfs_repair to add in -r option if required.

---
Changes since v2:
* Added check for USE_EXTERNAL in tests/xfs/291 & tests/xfs/070
* Call xfs_repair via $XFS_REPAIR_PROG

Changes since v1:
* Fixed kill -9 in test xfs/070

 tests/xfs/070 | 5 ++++-
 tests/xfs/291 | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
tests/xfs/070 +4 -1
index 0ae6eff..0d81977 100755
@@ -56,7 +56,10 @@ _cleanup()
 _xfs_repair_noscan()
 {
 	# invoke repair directly so we can kill the process if need be
-	$XFS_REPAIR_PROG $SCRATCH_DEV 2>&1 | tee -a $seqres.full > $tmp.repair &
+	[ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \
+    rt_repair_opts="-r $SCRATCH_RTDEV"
+	$XFS_REPAIR_PROG $rt_repair_opts $SCRATCH_DEV 2>&1 |
+    tee -a $seqres.full > $tmp.repair &
 	repair_pid=$!
 
 	# monitor progress for as long as it is running
tests/xfs/291 +4 -1
index 3f5295c..3788e62 100755
@@ -122,7 +122,10 @@ _xfs_check $SCRATCH_DEV >> $seqres.full 2>&1 || _fail "xfs_check failed"
 # Can xfs_metadump cope with this monster?
 _scratch_metadump $tmp.metadump || _fail "xfs_metadump failed"
 xfs_mdrestore $tmp.metadump $tmp.img || _fail "xfs_mdrestore failed"
-xfs_repair -f $tmp.img >> $seqres.full 2>&1 || _fail "xfs_repair of metadump failed"
+[ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \
+  rt_repair_opts="-r $SCRATCH_RTDEV"
+$XFS_REPAIR_PROG $rt_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \
+  _fail "xfs_repair of metadump failed"
 
 # Yes it can; success, all done
 status=0
Signature · 1 line
2.9.5