Re: [PATCH 4/8] generic/{482,757}: skip test if there are no FUA writes

Christoph Hellwig
2025-10-17T04:22:49Z

On Wed, Oct 15, 2025 at 09:37:45AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Both of these tests fail if the filesystem doesn't issue a FUA write to
> a device, but ... there's no requirement that filesystems actually use
> FUA at all. For example, a fuse filesystem that writes to the block
> device's page cache and issues fsync() will not cause the block layer to
> issue FUA writes for the dirty pages. Change that to _notrun.

Hmm, zoned ZXFS never issues FUA and didn't fail. Oh, these use dm thin
and thus are _notrun.

> index 8c114ee03058c6..25e05d7cdb1c0d 100755
> --- a/tests/generic/482
> +++ b/tests/generic/482
> @@ -82,7 +82,7 @@ _log_writes_remove
> prev=$(_log_writes_mark_to_entry_number mkfs)
> [ -z "$prev" ] && _fail "failed to locate entry mark 'mkfs'"
> cur=$(_log_writes_find_next_fua $prev)
> -[ -z "$cur" ] && _fail "failed to locate next FUA write"
> +[ -z "$cur" ] && _notrun "failed to locate next FUA write"

This isn't really the last but the first FUA write we're looking for
here, right?

>
> -[ -z "$cur" ] && _fail "failed to locate next FUA write"
> +[ -z "$cur" ] && _notrun "failed to locate next FUA write"

Same here.

The only reason I'm asking is because if we did this for every write
we'd kinda defeat the purpose of the test. But we're only doing it
to see if any FUA writes exists as far as I can tell, so we should
be ok. But it might be worth changing the messages.