diff mbox series

[06/16] fuzzy: explicitly check for common/inject in _require_xfs_stress_online_repair

Message ID 167243837380.694541.16030787606766361808.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: refactor online fsck stress tests | expand

Commit Message

Darrick J. Wong Dec. 30, 2022, 10:12 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

In _require_xfs_stress_online_repair, make sure that the test has
sourced common/inject before we try to call its functions.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/fuzzy |    2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/common/fuzzy b/common/fuzzy
index 94a6ce85a3..de9e398984 100644
--- a/common/fuzzy
+++ b/common/fuzzy
@@ -382,6 +382,8 @@  _require_xfs_stress_scrub() {
 _require_xfs_stress_online_repair() {
 	_require_xfs_stress_scrub
 	_require_xfs_io_command "repair"
+	command -v _require_xfs_io_error_injection &>/dev/null || \
+		_notrun 'xfs repair stress test requires common/inject'
 	_require_xfs_io_error_injection "force_repair"
 	_require_freeze
 }