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

Darrick J. Wong
2022-12-30T22:55:48Z

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