common: skip data write EIO survival tests on fatal configs
generic/441 and xfs/656 inject data write errors after mounting the scratch
filesystem on dm-error. These tests do not verify whether a filesystem may
shut down after media errors. They require the filesystem to survive long
enough to report the error through the path under test: generic/441 checks
fsync(2) writeback error reporting, and xfs/656 checks healthmon per-I/O
error events.
That expectation is not valid for filesystem configurations where a data
write error is fatal. Zoned XFS is one such case because a failed data write
can leave the in-core zone allocation state untrustworthy, so shutting down
the mount is expected behavior.
Add a common helper for tests that require data write EIO to be reported
without shutting down the mounted filesystem, and use it after mounting the
dm-error device in both tests. The helper currently detects zoned XFS by
checking the XFS per-mount zoned/max_open_zones sysfs attribute for the
mounted device, so the check follows the filesystem instance rather than the
underlying block queue alone.
Fatal-on-data-write-error configurations are reported as notrun instead of
test failures.
Signed-off-by: Yao Sang <sangyao@kylinos.cn>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
3 files changed